From 196862a9a1d5cc325459b3256f64b98cbee917f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Fri, 22 Aug 2014 10:27:19 +0100 Subject: [PATCH] Bug 1050802 - UI changes to stop screen/window separately, r=Gijs. --- browser/modules/webrtcUI.jsm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/browser/modules/webrtcUI.jsm b/browser/modules/webrtcUI.jsm index 0e0f29bce17..54dfe713e52 100644 --- a/browser/modules/webrtcUI.jsm +++ b/browser/modules/webrtcUI.jsm @@ -777,14 +777,6 @@ function updateBrowserSpecificIndicator(aBrowser) { perms.remove(uri.host, "microphone"); Services.obs.notifyObservers(null, "getUserMedia:revoke", windowId); - - // Performing an action from a notification removes it, but if the page - // uses screensharing and a device, we may have another notification to remove. - let outerWindowID = Services.wm.getCurrentInnerWindowWithId(windowId) - .QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindowUtils) - .outerWindowID; - removeBrowserSpecificIndicator(null, null, outerWindowID); } }]; let options = { @@ -827,6 +819,13 @@ function updateBrowserSpecificIndicator(aBrowser) { return aTopic == "swapping"; } }; + secondaryActions = [{ + label: stringBundle.getString("getUserMedia.stopSharing.label"), + accessKey: stringBundle.getString("getUserMedia.stopSharing.accesskey"), + callback: function () { + Services.obs.notifyObservers(null, "getUserMedia:revoke", "screen:" + windowId); + } + }]; // If we are sharing both a window and the screen, show 'Screen'. let stringId = "getUserMedia.sharing" + (screen.value ? "Screen" : "Window") + ".message"; chromeWin.PopupNotifications.show(aBrowser, "webRTC-sharingScreen",