Bug 1362195 - 2. Add onFullScreen to GeckoView.ContentListener; r=snorp
authorJim Chen <nchen@mozilla.com>
Thu, 11 May 2017 16:40:17 -0400
changeset 357985 2acf5f4b6943de39e799ed0eaa4af8a727d37f14
parent 357984 741e175e254c45b1cbc7f53043ae2f6bf5b9bcb1
child 357986 8e8e68c6e3ae1ff1539c0dec182b4eae040abfa9
push id31808
push usercbook@mozilla.com
push dateFri, 12 May 2017 12:37:49 +0000
treeherdermozilla-central@030c0a7c8781 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1362195
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1362195 - 2. Add onFullScreen to GeckoView.ContentListener; r=snorp Add the onFullScreen method to GeckoView.ContentListener to handle entering and exiting full screen mode.
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
@@ -141,17 +141,16 @@ public class GeckoView extends LayerView
         @WrapForJNI(calledFrom = "gecko")
         private synchronized void onReattach(final GeckoView view) {
             if (view.mNativeQueue == mNativeQueue) {
                 return;
             }
             view.mNativeQueue.setState(mNativeQueue.getState());
             mNativeQueue = view.mNativeQueue;
         }
-
     }
 
     // Object to hold onto our nsWindow connection when GeckoView gets destroyed.
     private static class StateBinder extends Binder implements Parcelable {
         public final Parcelable superState;
         public final Window window;
 
         public StateBinder(Parcelable superState, Window window) {
@@ -1059,16 +1058,26 @@ public class GeckoView extends LayerView
     public interface ContentListener {
         /**
         * A page title was discovered in the content or updated after the content
         * loaded.
         * @param view The GeckoView that initiated the callback.
         * @param title The title sent from the content.
         */
         void onTitleChange(GeckoView view, String title);
+
+        /**
+         * A page has entered or exited full screen mode. Typically, the implementation
+         * would set the Activity containing the GeckoView to full screen when the page is
+         * in full screen mode.
+         *
+         * @param view The GeckoView that initiated the callback.
+         * @param fullScreen True if the page is in full screen mode.
+         */
+        void onFullScreen(GeckoView view, boolean fullScreen);
     }
 
     public interface NavigationListener {
         /**
         * A view has started loading content from the network.
         * @param view The GeckoView that initiated the callback.
         * @param url The resource being loaded.
         */