Closed Bug 1370605 Opened 9 years ago Closed 8 years ago

[geckoview] Add exitFullScreen() call

Categories

(GeckoView :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: snorp, Assigned: snorp)

Details

Attachments

(2 files)

Right now content can enter fullscreen, and the app gets notified, but it cannot exit fullscreen.
Comment on attachment 8874916 [details] Bug 1370605 - Don't wait for a resize before entering fullscreen on Android https://reviewboard.mozilla.org/r/146290/#review150292 Wasn't this put in place to ensure that content gets the new viewport size when "fullscreenchange" is fired?
Comment on attachment 8874917 [details] Bug 1370605 - Add GeckoView.exitFullScreen() https://reviewboard.mozilla.org/r/146292/#review150296 ::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java:612 (Diff revision 1) > } > > /** > + * Exits fullscreen mode > + */ > + public void exitFullScreen() { Fullscreen? ::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java:613 (Diff revision 1) > > /** > + * Exits fullscreen mode > + */ > + public void exitFullScreen() { > + mEventDispatcher.dispatch("GeckoViewContent:ExitFullScreen", null); The other events spell it "Fullscreen", better keep it consistent. ::: mobile/android/modules/geckoview/GeckoViewContent.jsm:36 (Diff revision 1) > + > + this.eventDispatcher.registerListener(this, ["GeckoViewContent:ExitFullScreen"]); > + } > + > + // Bundle event handler. > + onEvent(aEvent, aData, aCallback) { Please add a general debug log with the event type. ::: mobile/android/modules/geckoview/GeckoViewContent.jsm:39 (Diff revision 1) > + > + // Bundle event handler. > + onEvent(aEvent, aData, aCallback) { > + switch (aEvent) { > + case "GeckoViewContent:ExitFullScreen": > + this.browser.messageManager.sendAsyncMessage("GeckoView:DOMFullscreenExited"); All instances of this.browser.messageManager can be refactored to this.messageManager.
Attachment #8874917 - Flags: review?(esawin) → review+
Component: Embedding: APIs → GeckoView
Product: Core → Firefox for Android
Version: unspecified → Trunk
Comment on attachment 8874916 [details] Bug 1370605 - Don't wait for a resize before entering fullscreen on Android https://reviewboard.mozilla.org/r/146290/#review153488
Attachment #8874916 - Flags: review?(esawin) → review+
Comment on attachment 8874916 [details] Bug 1370605 - Don't wait for a resize before entering fullscreen on Android https://reviewboard.mozilla.org/r/146290/#review150292 We'll probably get two resize events now instead of one. We could fix that by keeping the two-stage API, but would need better hooks exposed for GV. Probably worth a followup bug.
Pushed by jwillcox@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3d36177387cb Don't wait for a resize before entering fullscreen on Android r=esawin https://hg.mozilla.org/integration/mozilla-inbound/rev/2733d0c87013 Add GeckoView.exitFullScreen() r=esawin
Assignee: nobody → snorp
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 56 → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: