Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3888)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java

Issue 917213003: Clean up for https://codereview.chromium.org/884483006/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java
index 50b640bc4b236c90b9ca8da174cba726da125d20..6f16a74d1e3bddcc61b5f7af16c7748e655bcea6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java
@@ -70,21 +70,16 @@ public class FullscreenHtmlApiHandler {
/**
* Delegate that allows embedders to react to fullscreen API requests.
*/
- // TODO(changwan): change this to interface
- public static class FullscreenHtmlApiDelegate {
+ public interface FullscreenHtmlApiDelegate {
/**
* @return The Y offset to be applied to the fullscreen notification.
*/
- public int getNotificationOffsetY() {
- return 0;
- }
+ int getNotificationOffsetY();
/**
* @return The view that the fullscreen notification will be pinned to.
*/
- public View getNotificationAnchorView() {
- return null;
- }
+ View getNotificationAnchorView();
/**
* Notifies the delegate that entering fullscreen has been requested and allows them
@@ -93,24 +88,13 @@ public class FullscreenHtmlApiHandler {
* Once the delegate has hidden the their controls, it must call
* {@link FullscreenHtmlApiHandler#enterFullscreen(Tab)}.
*/
- public void onEnterFullscreen() {}
+ void onEnterFullscreen();
/**
* Cancels a pending enter fullscreen request if present.
* @return Whether the request was cancelled.
*/
- public 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) {}
+ boolean cancelPendingEnterFullscreen();
/**
* Notifies the delegate that the window UI has fully exited fullscreen and gives
@@ -118,15 +102,13 @@ public class FullscreenHtmlApiHandler {
*
* @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
* overlay mode, the notification bubble should be disabled.
*/
- public boolean shouldShowNotificationBubble() {
- return true;
- }
+ boolean shouldShowNotificationBubble();
}
// This static inner class holds a WeakReference to the outer object, to avoid triggering the
@@ -299,16 +281,6 @@ public class FullscreenHtmlApiHandler {
*/
public void enterFullscreen(final Tab tab) {
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;
final View contentView = contentViewCore.getContainerView();
int systemUiVisibility = contentView.getSystemUiVisibility();
@@ -352,6 +324,7 @@ public class FullscreenHtmlApiHandler {
contentView.addOnLayoutChangeListener(mFullscreenOnLayoutChangeListener);
contentView.setSystemUiVisibility(systemUiVisibility);
mContentViewCoreInFullscreen = contentViewCore;
+ mTabInFullscreen = tab;
}
/**
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698