Commit b4d84504 authored by changwan's avatar changwan Committed by Commit bot

Clean up for https://codereview.chromium.org/884483006/

BUG=430635

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

Cr-Commit-Position: refs/heads/master@{#316995}
parent 94b2fd41
...@@ -182,23 +182,6 @@ public class ChromeFullscreenManager ...@@ -182,23 +182,6 @@ public class ChromeFullscreenManager
} }
} }
/**
* Creates an instance of the fullscreen mode manager.
* @param activity The activity that supports fullscreen.
* @param controlContainer Container holding the controls (Toolbar).
* @param enabled Whether fullscreen is globally enabled.
* @param persistentFullscreenSupported Whether persistent fullscreen mode is supported.
* @param modelSelector The model selector providing access to the current tab.
* @param resControlContainerHeight The dimension resource ID for the control container height.
*/
// TODO(changwan): remove
public ChromeFullscreenManager(Activity activity, View controlContainer, boolean enabled,
boolean persistentFullscreenSupported, TabModelSelector modelSelector,
int resControlContainerHeight) {
this(activity, controlContainer, enabled, persistentFullscreenSupported,
modelSelector, resControlContainerHeight, true);
}
/** /**
* Creates an instance of the fullscreen mode manager. * Creates an instance of the fullscreen mode manager.
* @param activity The activity that supports fullscreen. * @param activity The activity that supports fullscreen.
......
...@@ -70,21 +70,16 @@ public class FullscreenHtmlApiHandler { ...@@ -70,21 +70,16 @@ public class FullscreenHtmlApiHandler {
/** /**
* Delegate that allows embedders to react to fullscreen API requests. * Delegate that allows embedders to react to fullscreen API requests.
*/ */
// TODO(changwan): change this to interface public interface FullscreenHtmlApiDelegate {
public static class FullscreenHtmlApiDelegate {
/** /**
* @return The Y offset to be applied to the fullscreen notification. * @return The Y offset to be applied to the fullscreen notification.
*/ */
public int getNotificationOffsetY() { int getNotificationOffsetY();
return 0;
}
/** /**
* @return The view that the fullscreen notification will be pinned to. * @return The view that the fullscreen notification will be pinned to.
*/ */
public View getNotificationAnchorView() { View getNotificationAnchorView();
return null;
}
/** /**
* Notifies the delegate that entering fullscreen has been requested and allows them * Notifies the delegate that entering fullscreen has been requested and allows them
...@@ -93,24 +88,13 @@ public class FullscreenHtmlApiHandler { ...@@ -93,24 +88,13 @@ public class FullscreenHtmlApiHandler {
* Once the delegate has hidden the their controls, it must call * Once the delegate has hidden the their controls, it must call
* {@link FullscreenHtmlApiHandler#enterFullscreen(Tab)}. * {@link FullscreenHtmlApiHandler#enterFullscreen(Tab)}.
*/ */
public void onEnterFullscreen() {} void onEnterFullscreen();
/** /**
* Cancels a pending enter fullscreen request if present. * Cancels a pending enter fullscreen request if present.
* @return Whether the request was cancelled. * @return Whether the request was cancelled.
*/ */
public boolean cancelPendingEnterFullscreen() { boolean cancelPendingEnterFullscreen();
return true;
}
/**
* Notifies the delegate that the window UI has fully exited fullscreen and gives
* the embedder a chance to update their controls.
*
* @param contentViewCore The CVC for the tab whose fullscreen is being exited.
*/
// TODO(changwan): remove
public void onFullscreenExited(ContentViewCore contentViewCore) {}
/** /**
* Notifies the delegate that the window UI has fully exited fullscreen and gives * Notifies the delegate that the window UI has fully exited fullscreen and gives
...@@ -118,15 +102,13 @@ public class FullscreenHtmlApiHandler { ...@@ -118,15 +102,13 @@ public class FullscreenHtmlApiHandler {
* *
* @param tab The tab whose fullscreen is being exited. * @param tab The tab whose fullscreen is being exited.
*/ */
public void onFullscreenExited(Tab tab) {} void onFullscreenExited(Tab tab);
/** /**
* @return Whether the notification bubble should be shown. For fullscreen video in * @return Whether the notification bubble should be shown. For fullscreen video in
* overlay mode, the notification bubble should be disabled. * overlay mode, the notification bubble should be disabled.
*/ */
public boolean shouldShowNotificationBubble() { boolean shouldShowNotificationBubble();
return true;
}
} }
// This static inner class holds a WeakReference to the outer object, to avoid triggering the // This static inner class holds a WeakReference to the outer object, to avoid triggering the
...@@ -299,16 +281,6 @@ public class FullscreenHtmlApiHandler { ...@@ -299,16 +281,6 @@ public class FullscreenHtmlApiHandler {
*/ */
public void enterFullscreen(final Tab tab) { public void enterFullscreen(final Tab tab) {
ContentViewCore contentViewCore = tab.getContentViewCore(); ContentViewCore contentViewCore = tab.getContentViewCore();
enterFullscreen(contentViewCore);
mTabInFullscreen = tab;
}
/**
* Handles hiding the system UI components to allow the content to take up the full screen.
* @param tab The CVC for the tab that is entering fullscreen.
*/
// TODO(changwan): remove
public void enterFullscreen(final ContentViewCore contentViewCore) {
if (contentViewCore == null) return; if (contentViewCore == null) return;
final View contentView = contentViewCore.getContainerView(); final View contentView = contentViewCore.getContainerView();
int systemUiVisibility = contentView.getSystemUiVisibility(); int systemUiVisibility = contentView.getSystemUiVisibility();
...@@ -352,6 +324,7 @@ public class FullscreenHtmlApiHandler { ...@@ -352,6 +324,7 @@ public class FullscreenHtmlApiHandler {
contentView.addOnLayoutChangeListener(mFullscreenOnLayoutChangeListener); contentView.addOnLayoutChangeListener(mFullscreenOnLayoutChangeListener);
contentView.setSystemUiVisibility(systemUiVisibility); contentView.setSystemUiVisibility(systemUiVisibility);
mContentViewCoreInFullscreen = contentViewCore; mContentViewCoreInFullscreen = contentViewCore;
mTabInFullscreen = tab;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment