Refactor handleMessage() functionality in fullscreen
to static inner class to avoid HandlerLeak lint warnings

The following HandlerLeak lint warnings are reported that are legitimate:

(1) org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java
    This Handler class should be static or leaks might occur
    (org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager.2):
    HandlerLeak [warning]

(2) org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java
    This Handler class should be static or leaks might occur
    (org.chromium.chrome.browser.fullscreen.FullscreenHtmlApiHandler.1):
    HandlerLeak [warning]

The above warnings needs to fixed as the references to Handler class
might prevent outer class from getting garbage collected.

Making static inner class do not hold an implicit reference to the outer
class and hence this problem can be avoided. The same is also done for other
classes eg: TapGestureDetector.

BUG=None.

Review URL: https://codereview.chromium.org/844473002

Cr-Commit-Position: refs/heads/master@{#311226}
2 files changed