Closed Bug 1046971 Opened 10 years ago Closed 10 years ago

Add ability to stop mirroring a tab

Categories

(Firefox for Android Graveyard :: Screencasting, defect)

x86
macOS
defect
Not set
normal

Tracking

(firefox34 verified, fennec33+)

VERIFIED FIXED
Firefox 34
Tracking Status
firefox34 --- verified
fennec 33+ ---

People

(Reporter: blassey, Assigned: blassey)

References

Details

Attachments

(1 file)

      No description provided.
Attachment #8465679 - Flags: review?(mark.finkle)
Comment on attachment 8465679 [details] [diff] [review]
stop_mirror.patch

>diff --git a/mobile/android/chrome/content/CastingApps.js b/mobile/android/chrome/content/CastingApps.js

> var CastingApps = {
>   _castMenuId: -1,
>-  menuItem: -1,
>+  mirrorMenuItem: -1,
>+  stopMenuItem: -1,

Let's just use: startMenuId and stopMenuId


>+      this.stopMenuItem = NativeWindow.menu.add(
>+        Strings.browser.GetStringFromName("casting.mirrorTabStop"),
>+        "drawable://casting",
>+        function() {
>+          if (this.tabMirror) {
>+            this.tabMirror.stop();
>+            this.tabMirror = null;
>+          }
>+          NativeWindow.menu.update(this.mirrorMenuItem, { visible: true });
>+          NativeWindow.menu.update(this.stopMenuItem, { visible: false });
>+        }.bind(this));
>     }

Remember to use the new syntax and place it in the Tools menu

>diff --git a/mobile/android/modules/TabMirror.jsm b/mobile/android/modules/TabMirror.jsm

>     }
>   }
>+  return { stop: function() { let obj = {

* Add a blank line before the "return"
* Add line breaks after the { braces like

    return {
      stop: function() {
        let obj = {

And indent the rest appropriately

>+    if (deviceId) {
>+      Services.androidBridge.handleGeckoMessage(obj);
>+    } } }

Same line breaks here

r+ but make sure this applies over the patch you already have to hide the menu
Attachment #8465679 - Flags: review?(mark.finkle) → review+
Blocks: 1048335
Assignee: nobody → blassey.bugs
tracking-fennec: ? → 33+
this landed http://hg.mozilla.org/mozilla-central/rev/8d7b53cc415e
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Flags: qe-verify+
Verified as fixed in build 34.0a1 (2014-08-19);
Device: Motorola Razr (Android 4.1.2).
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: