Bug 1037408 - implement the global indicator window, initial patch by Gijs, r=dolske.
☠☠ backed out by 876659559bd8 ☠ ☠
authorFlorian Quèze <florian@queze.net>
Sat, 19 Jul 2014 02:49:19 +0200
changeset 217031 8833bb7e90de88b625df48344f43cf7f6e653548
parent 217030 c9cfdc0bbfbce5cd4b4fc0a2d876d71ce86400de
child 217032 1db5409ea062d50c47374f1713af1f232e57d0ef
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske
bugs1037408
milestone33.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 1037408 - implement the global indicator window, initial patch by Gijs, r=dolske.
browser/base/content/webrtcIndicator.js
browser/base/content/webrtcIndicator.xul
browser/base/jar.mn
browser/locales/en-US/chrome/browser/webrtcIndicator.properties
browser/locales/jar.mn
browser/modules/webrtcUI.jsm
browser/themes/linux/jar.mn
browser/themes/osx/jar.mn
browser/themes/shared/webrtc/camera-white-16.png
browser/themes/shared/webrtc/camera-white-16@2x.png
browser/themes/shared/webrtc/indicator.css
browser/themes/shared/webrtc/microphone-white-16.png
browser/themes/shared/webrtc/microphone-white-16@2x.png
browser/themes/shared/webrtc/screen-white-16.png
browser/themes/shared/webrtc/screen-white-16@2x.png
browser/themes/windows/jar.mn
new file mode 100644
--- /dev/null
+++ b/browser/base/content/webrtcIndicator.js
@@ -0,0 +1,123 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+const Cu = Components.utils;
+Cu.import("resource://gre/modules/Services.jsm");
+Cu.import("resource:///modules/webrtcUI.jsm");
+
+const BUNDLE_URL = "chrome://browser/locale/webrtcIndicator.properties";
+let gStringBundle;
+
+function init(event) {
+  gStringBundle = Services.strings.createBundle(BUNDLE_URL);
+
+  let brand = Services.strings.createBundle("chrome://branding/locale/brand.properties");
+  let brandShortName = brand.GetStringFromName("brandShortName");
+  document.title =
+    gStringBundle.formatStringFromName("webrtcIndicator.windowtitle",
+                                       [brandShortName], 1);
+
+  for (let id of ["audioVideoButton", "screenSharePopup"]) {
+    let popup = document.getElementById(id);
+    popup.addEventListener("popupshowing", onPopupMenuShowing);
+    popup.addEventListener("popuphiding", onPopupMenuHiding);
+    popup.addEventListener("command", onPopupMenuCommand);
+  }
+
+  document.getElementById("firefoxButton")
+          .addEventListener("click", onFirefoxButtonClick);
+
+  updateIndicatorState();
+}
+
+function updateIndicatorState() {
+  updateWindowAttr("sharingvideo", webrtcUI.showCameraIndicator);
+  updateWindowAttr("sharingaudio", webrtcUI.showMicrophoneIndicator);
+  updateWindowAttr("sharingscreen", webrtcUI.showScreenSharingIndicator);
+
+  // Camera and microphone button tooltip.
+  let shareTypes = [];
+  if (webrtcUI.showCameraIndicator)
+    shareTypes.push("Camera");
+  if (webrtcUI.showMicrophoneIndicator)
+    shareTypes.push("Microphone");
+
+  let audioVideoButton = document.getElementById("audioVideoButton");
+  if (shareTypes.length) {
+    let stringId = "webrtcIndicator.sharing" + shareTypes.join("And") + ".tooltip";
+    audioVideoButton.setAttribute("tooltiptext",
+                                   gStringBundle.GetStringFromName(stringId));
+  }
+  else {
+    audioVideoButton.removeAttribute("tooltiptext");
+  }
+
+  // Screen sharing button tooltip.
+  let screenShareButton = document.getElementById("screenShareButton");
+  if (webrtcUI.showScreenSharingIndicator) {
+    let stringId = "webrtcIndicator.sharing" +
+                   webrtcUI.showScreenSharingIndicator + ".tooltip";
+    screenShareButton.setAttribute("tooltiptext",
+                                    gStringBundle.GetStringFromName(stringId));
+  }
+  else {
+    screenShareButton.removeAttribute("tooltiptext");
+  }
+
+  // Resize and center the window.
+  window.sizeToContent();
+  window.moveTo((screen.availWidth - document.documentElement.clientWidth) / 2, 0);
+}
+
+function updateWindowAttr(attr, value) {
+  let docEl = document.documentElement;
+  if (value)
+    docEl.setAttribute(attr, "true");
+  else
+    docEl.removeAttribute(attr);
+}
+
+function onPopupMenuShowing(event) {
+  let popup = event.target;
+  let type = popup.getAttribute("type");
+
+  let activeStreams;
+  if (type == "Devices")
+    activeStreams = webrtcUI.getActiveStreams(true, true, false);
+  else
+    activeStreams = webrtcUI.getActiveStreams(false, false, true);
+
+  if (activeStreams.length == 1) {
+    webrtcUI.showSharingDoorhanger(activeStreams[0], type);
+    return false;
+  }
+
+  for (let stream of activeStreams) {
+    let item = document.createElement("menuitem");
+    item.setAttribute("label", stream.browser.contentTitle || stream.uri);
+    item.setAttribute("tooltiptext", stream.uri);
+    item.stream = stream;
+    popup.appendChild(item);
+  }
+
+  return true;
+}
+
+function onPopupMenuHiding(event) {
+  let popup = event.target;
+  while (popup.firstChild)
+    popup.firstChild.remove();
+}
+
+function onPopupMenuCommand(event) {
+  let item = event.target;
+  webrtcUI.showSharingDoorhanger(item.stream,
+                                 item.parentNode.getAttribute("type"));
+}
+
+function onFirefoxButtonClick(event) {
+  event.target.blur();
+  let activeStreams = webrtcUI.getActiveStreams(true, true, true);
+  activeStreams[0].browser.ownerDocument.defaultView.focus();
+}
new file mode 100644
--- /dev/null
+++ b/browser/base/content/webrtcIndicator.xul
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/skin/webRTC-indicator.css" type="text/css"?>
+
+<!DOCTYPE window>
+
+<window xmlns:html="http://www.w3.org/1999/xhtml"
+        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        id="webrtcIndicator"
+        html:role="alert"
+        windowtype="Browser:WebRTCGlobalIndicator"
+        onload="init(event);"
+#ifdef XP_MACOSX
+        inwindowmenu="false"
+#endif
+        sizemode="normal"
+        hidechrome="true"
+        orient="horizontal"
+        >
+  <script type="application/javascript" src="chrome://browser/content/webrtcIndicator.js"/>
+
+  <button id="firefoxButton"/>
+  <button id="audioVideoButton" type="menu">
+    <menupopup id="audioVideoPopup" type="Devices"/>
+  </button>
+  <separator id="shareSeparator"/>
+  <button id="screenShareButton" type="menu">
+    <menupopup id="screenSharePopup" type="Screen"/>
+  </button>
+</window>
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -130,16 +130,18 @@ browser.jar:
 *       content/browser/hiddenWindow.xul              (content/hiddenWindow.xul)
 #ifdef XP_MACOSX
 *       content/browser/macBrowserOverlay.xul         (content/macBrowserOverlay.xul)
 *       content/browser/downloadManagerOverlay.xul    (content/downloadManagerOverlay.xul)
 *       content/browser/jsConsoleOverlay.xul          (content/jsConsoleOverlay.xul)
 *       content/browser/softwareUpdateOverlay.xul  (content/softwareUpdateOverlay.xul)
 #endif
 *       content/browser/viewSourceOverlay.xul         (content/viewSourceOverlay.xul)
+*       content/browser/webrtcIndicator.xul           (content/webrtcIndicator.xul)
+        content/browser/webrtcIndicator.js            (content/webrtcIndicator.js)
 #ifdef XP_WIN
         content/browser/win6BrowserOverlay.xul        (content/win6BrowserOverlay.xul)
 #endif
         content/browser/socialmarks.xml               (content/socialmarks.xml)
         content/browser/socialchat.xml                (content/socialchat.xml)
 # the following files are browser-specific overrides
 *       content/browser/license.html                  (/toolkit/content/license.html)
 % override chrome://global/content/license.html chrome://browser/content/license.html
new file mode 100644
--- /dev/null
+++ b/browser/locales/en-US/chrome/browser/webrtcIndicator.properties
@@ -0,0 +1,16 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# LOCALIZATION NOTE : FILE This file contains the webrtc global indicator strings
+
+# LOCALIZATION NOTE (webrtcIndicator.windowtitle): %S is the brand name (e.g. Firefox).
+# This string is used so that the window has a title in tools that enumerate/look for window
+# titles. It is not normally visible anywhere.
+webrtcIndicator.windowtitle = %S - Sharing Indicator
+
+webrtcIndicator.sharingCameraAndMicrophone.tooltip = Your camera and microphone are being shared. Click to control sharing.
+webrtcIndicator.sharingCamera.tooltip              = Your camera is being shared. Click to control sharing.
+webrtcIndicator.sharingMicrophone.tooltip          = Your microphone is being shared. Click to control sharing.
+webrtcIndicator.sharingScreen.tooltip = Your screen is being shared. Click to control sharing.
+webrtcIndicator.sharingWindow.tooltip = A window is being shared. Click to control sharing.
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -80,16 +80,17 @@
     locale/browser/setDesktopBackground.dtd        (%chrome/browser/setDesktopBackground.dtd)
     locale/browser/shellservice.properties         (%chrome/browser/shellservice.properties)
     locale/browser/tabbrowser.dtd                  (%chrome/browser/tabbrowser.dtd)
     locale/browser/tabbrowser.properties           (%chrome/browser/tabbrowser.properties)
     locale/browser/tabview.properties              (%chrome/browser/tabview.properties)
     locale/browser/taskbar.properties              (%chrome/browser/taskbar.properties)
     locale/browser/translation.dtd                 (%chrome/browser/translation.dtd)
     locale/browser/translation.properties          (%chrome/browser/translation.properties)
+    locale/browser/webrtcIndicator.properties      (%chrome/browser/webrtcIndicator.properties)
     locale/browser/downloads/downloads.dtd         (%chrome/browser/downloads/downloads.dtd)
     locale/browser/downloads/downloads.properties  (%chrome/browser/downloads/downloads.properties)
     locale/browser/places/places.dtd               (%chrome/browser/places/places.dtd)
     locale/browser/places/places.properties        (%chrome/browser/places/places.properties)
     locale/browser/places/editBookmarkOverlay.dtd  (%chrome/browser/places/editBookmarkOverlay.dtd)
     locale/browser/places/bookmarkProperties.properties (%chrome/browser/places/bookmarkProperties.properties)
     locale/browser/preferences/selectBookmark.dtd  (%chrome/browser/preferences/selectBookmark.dtd)
     locale/browser/places/moveBookmarks.dtd        (%chrome/browser/places/moveBookmarks.dtd)
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -8,16 +8,18 @@ this.EXPORTED_SYMBOLS = ["webrtcUI"];
 
 const Cu = Components.utils;
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
+const INDICATOR_CHROME_URI = "chrome://browser/content/webrtcIndicator.xul";
+
 XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
                                   "resource://gre/modules/PluralForm.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "MediaManagerService",
                                    "@mozilla.org/mediaManagerService;1",
                                    "nsIMediaManagerService");
 
 this.webrtcUI = {
@@ -62,16 +64,30 @@ this.webrtcUI = {
         uri: contentWindow.location.href,
         tab: tab,
         browser: browser
       });
     }
     return activeStreams;
   },
 
+  showSharingDoorhanger: function(aActiveStream, aType) {
+    let browserWindow = aActiveStream.browser.ownerDocument.defaultView;
+    if (aActiveStream.tab) {
+      browserWindow.gBrowser.selectedTab = aActiveStream.tab;
+    } else {
+      aActiveStream.browser.focus();
+    }
+    browserWindow.focus();
+    let PopupNotifications = browserWindow.PopupNotifications;
+    let notif = PopupNotifications.getNotification("webRTC-sharing" + aType,
+                                                   aActiveStream.browser);
+    notif.reshow();
+  },
+
   updateMainActionLabel: function(aMenuList) {
     let type = aMenuList.selectedItem.getAttribute("devicetype");
     let document = aMenuList.ownerDocument;
     document.getElementById("webRTC-all-windows-shared").hidden = type != "Screen";
 
     // If we are also requesting audio in addition to screen sharing,
     // always use a generic label.
     if (!document.getElementById("webRTC-selectMicrophone").hidden)
@@ -397,16 +413,18 @@ function prompt(aContentWindow, aCallID,
   if (requestTypes.length == 1 && requestTypes[0] == "Microphone")
     anchorId = "webRTC-shareMicrophone-notification-icon";
   if (requestTypes.indexOf("Screen") != -1)
     anchorId = "webRTC-shareScreen-notification-icon";
   chromeWin.PopupNotifications.show(browser, "webRTC-shareDevices", message,
                                     anchorId, mainAction, secondaryActions, options);
 }
 
+var gIndicatorWindow = null;
+
 function updateIndicators() {
   let contentWindowSupportsArray = MediaManagerService.activeMediaCaptureWindows;
   let count = contentWindowSupportsArray.Count();
 
   webrtcUI.showGlobalIndicator = count > 0;
 
   let e = Services.wm.getEnumerator("navigator:browser");
   while (e.hasMoreElements())
@@ -427,16 +445,29 @@ function updateIndicators() {
       webrtcUI.showMicrophoneIndicator = true;
     if (screen.value)
       webrtcUI.showScreenSharingIndicator = "Screen";
     else if (window.value && !webrtcUI.showScreenSharingIndicator)
       webrtcUI.showScreenSharingIndicator = "Window";
 
     showBrowserSpecificIndicator(getBrowserForWindow(contentWindow));
   }
+
+  if (webrtcUI.showGlobalIndicator) {
+    if (!gIndicatorWindow) {
+      const features = "chrome,dialog=yes,titlebar=no,popup=yes";
+      gIndicatorWindow = Services.ww.openWindow(null, INDICATOR_CHROME_URI, "_blank",
+                                                features, []);
+    } else {
+      gIndicatorWindow.updateIndicatorState();
+    }
+  } else if (gIndicatorWindow) {
+    gIndicatorWindow.close();
+    gIndicatorWindow = null;
+  }
 }
 
 function showBrowserSpecificIndicator(aBrowser) {
   let camera = {}, microphone = {}, screen = {}, window = {};
   MediaManagerService.mediaCaptureWindowState(aBrowser.contentWindow,
                                               camera, microphone, screen, window);
   let captureState;
   if (camera.value && microphone.value) {
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -72,16 +72,20 @@ browser.jar:
   skin/classic/browser/webRTC-shareDevice-64.png
   skin/classic/browser/webRTC-sharingDevice-16.png
   skin/classic/browser/webRTC-shareMicrophone-16.png
   skin/classic/browser/webRTC-shareMicrophone-64.png
   skin/classic/browser/webRTC-sharingMicrophone-16.png
   skin/classic/browser/webRTC-shareScreen-16.png      (../shared/webrtc/webRTC-shareScreen-16.png)
   skin/classic/browser/webRTC-shareScreen-64.png      (../shared/webrtc/webRTC-shareScreen-64.png)
   skin/classic/browser/webRTC-sharingScreen-16.png    (../shared/webrtc/webRTC-sharingScreen-16.png)
+* skin/classic/browser/webRTC-indicator.css           (../shared/webrtc/indicator.css)
+  skin/classic/browser/webRTC-camera-white-16.png     (../shared/webrtc/camera-white-16.png)
+  skin/classic/browser/webRTC-microphone-white-16.png (../shared/webrtc/microphone-white-16.png)
+  skin/classic/browser/webRTC-screen-white-16.png     (../shared/webrtc/screen-white-16.png)
   skin/classic/browser/customizableui/background-noise-toolbar.png  (customizableui/background-noise-toolbar.png)
   skin/classic/browser/customizableui/customize-illustration.png  (../shared/customizableui/customize-illustration.png)
   skin/classic/browser/customizableui/customize-illustration-rtl.png  (../shared/customizableui/customize-illustration-rtl.png)
   skin/classic/browser/customizableui/customizeMode-gridTexture.png  (customizableui/customizeMode-gridTexture.png)
   skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png  (customizableui/customizeMode-separatorHorizontal.png)
   skin/classic/browser/customizableui/customizeMode-separatorVertical.png  (customizableui/customizeMode-separatorVertical.png)
   skin/classic/browser/customizableui/customizeFavicon.ico  (../shared/customizableui/customizeFavicon.ico)
   skin/classic/browser/customizableui/info-icon-customizeTip.png  (../shared/customizableui/info-icon-customizeTip.png)
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -126,16 +126,23 @@ browser.jar:
   skin/classic/browser/webRTC-sharingMicrophone-16.png
   skin/classic/browser/webRTC-sharingMicrophone-16@2x.png
   skin/classic/browser/webRTC-shareScreen-16.png      (../shared/webrtc/webRTC-shareScreen-16.png)
   skin/classic/browser/webRTC-shareScreen-16@2x.png   (../shared/webrtc/webRTC-shareScreen-16@2x.png)
   skin/classic/browser/webRTC-shareScreen-64.png      (../shared/webrtc/webRTC-shareScreen-64.png)
   skin/classic/browser/webRTC-shareScreen-64@2x.png   (../shared/webrtc/webRTC-shareScreen-64@2x.png)
   skin/classic/browser/webRTC-sharingScreen-16.png    (../shared/webrtc/webRTC-sharingScreen-16.png)
   skin/classic/browser/webRTC-sharingScreen-16@2x.png (../shared/webrtc/webRTC-sharingScreen-16@2x.png)
+* skin/classic/browser/webRTC-indicator.css           (../shared/webrtc/indicator.css)
+  skin/classic/browser/webRTC-camera-white-16.png     (../shared/webrtc/camera-white-16.png)
+  skin/classic/browser/webRTC-camera-white-16@2x.png  (../shared/webrtc/camera-white-16@2x.png)
+  skin/classic/browser/webRTC-microphone-white-16.png (../shared/webrtc/microphone-white-16.png)
+  skin/classic/browser/webRTC-microphone-white-16@2x.png (../shared/webrtc/microphone-white-16@2x.png)
+  skin/classic/browser/webRTC-screen-white-16.png     (../shared/webrtc/screen-white-16.png)
+  skin/classic/browser/webRTC-screen-white-16@2x.png  (../shared/webrtc/screen-white-16@2x.png)
   skin/classic/browser/customizableui/background-noise-toolbar.png  (customizableui/background-noise-toolbar.png)
   skin/classic/browser/customizableui/customize-titleBar-toggle.png  (customizableui/customize-titleBar-toggle.png)
   skin/classic/browser/customizableui/customize-titleBar-toggle@2x.png  (customizableui/customize-titleBar-toggle@2x.png)
   skin/classic/browser/customizableui/customize-illustration.png  (../shared/customizableui/customize-illustration.png)
   skin/classic/browser/customizableui/customize-illustration@2x.png  (../shared/customizableui/customize-illustration@2x.png)
   skin/classic/browser/customizableui/customize-illustration-rtl.png  (../shared/customizableui/customize-illustration-rtl.png)
   skin/classic/browser/customizableui/customize-illustration-rtl@2x.png  (../shared/customizableui/customize-illustration-rtl@2x.png)
   skin/classic/browser/customizableui/customizeFavicon.ico  (../shared/customizableui/customizeFavicon.ico)
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..59281ed5becd06ecf3f662e7a04dd32646d6fabe
GIT binary patch
literal 1138
zc$|Gy&1>976c=$x(j<l@5Yje>PGnk2iFQV_`dA5Xob_s5FLYhAS?IQ>jHHoQ*wV<-
zI4heR?9>P6)Le3Hp@C9LTj<v*hq_Q`dut1(kX!o?v>}%q0^5;onNWfUq?z~he!utL
zy!UixapA4WGq0SHBx$lU@ASl8DW20O#rxIAV<NVfd3(UGvw)9CN~NaHTnai7S)x5k
z{Pope>9izGY=`{;A9UZgJr-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3C??QfA^o*L1qCx)Ni|Ccxt>7A1jEnkE$
z%d1A8tQ(!%xDQ<2X`3$oDEGp-*oHT{pR1B{uOxr&ZwIC7I#WJhT(bYAWKPx4WM%S|
z3tewN_|{#?Elop{A0E8a!GsT=9zHO2?1PE&uN1OtYOtdyZ#-x3@4f@O=Oe|IyrMwW
zX{B+(AnT5JjK{uy@5^V-7H&M!S6Zp_4PFV)e=`|5*Q9^<#KrNR*Y~WwRuVu?#^KmM
Sv$Qe&H*~wa&iCsBo&N&EU+NzK
new file mode 100644
--- /dev/null
+++ b/browser/themes/shared/webrtc/indicator.css
@@ -0,0 +1,129 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+window {
+  border: 1px solid #ff9500;
+}
+
+#audioVideoButton,
+#screenShareButton,
+#firefoxButton {
+  height: 29px;
+  margin: 0;
+  -moz-appearance: none;
+  border-style: none;
+}
+
+#firefoxButton {
+  background-image: url("chrome://branding/content/icon48.png");
+  background-repeat: no-repeat;
+  background-size: 22px;
+  background-position: center center;
+  min-width: 29px;
+  background-color: white;
+}
+
+#firefoxButton:hover {
+  background-color: #f2f2f2;
+}
+
+#screenShareButton {
+  background-image: url("webRTC-screen-white-16.png");
+  background-position: center center;
+  background-repeat: no-repeat;
+  background-size: 16px;
+  min-width: 27px;
+  display: none;
+}
+
+window[sharingscreen] > #screenShareButton {
+  display: -moz-box;
+}
+
+#audioVideoButton {
+  display: none;
+  background-repeat: no-repeat;
+}
+
+/* When screen sharing, need to pull in the separator: */
+window[sharingscreen] > #audioVideoButton {
+  margin-right: -1px;
+}
+
+/* Single icon button: */
+window[sharingvideo] > #audioVideoButton,
+window[sharingaudio] > #audioVideoButton {
+  display: -moz-box;
+  background-position: center center;
+  background-size: 16px;
+  min-width: 26px;
+}
+
+window[sharingvideo] > #audioVideoButton {
+  background-image: url("webRTC-camera-white-16.png");
+}
+
+window[sharingaudio] > #audioVideoButton {
+  background-image: url("webRTC-microphone-white-16.png");
+}
+
+/* Multi-icon button: */
+window[sharingaudio][sharingvideo] > #audioVideoButton {
+  background-image: url("webRTC-camera-white-16.png"),
+                    url("webRTC-microphone-white-16.png");
+  background-position: 6px center, 26px center;
+  background-size: 16px, 16px;
+  min-width: 46px;
+}
+
+/* Hover styles */
+#audioVideoButton,
+#screenShareButton {
+  background-color: #ffaa33;
+}
+
+#audioVideoButton:hover,
+#screenShareButton:hover {
+  background-color: #ff9500;
+}
+
+/* Don't show the dropmarker for the type="menu" case */
+#audioVideoButton > .box-inherit > .button-menu-dropmarker,
+#screenShareButton > .box-inherit > .button-menu-dropmarker {
+  display: none;
+}
+
+/* Separator in case of screen sharing + video/audio sharing */
+#shareSeparator {
+  width: 1px;
+  margin: 4px -1px 4px 0;
+  background-color: #FFCA80;
+  /* Separator needs to show above either button when they're hovered: */
+  position: relative;
+  z-index: 1;
+  display: none;
+}
+
+window[sharingscreen][sharingvideo] > #shareSeparator,
+window[sharingscreen][sharingaudio] > #shareSeparator {
+  display: -moz-box;
+}
+
+%ifdef XP_MACOSX
+@media (min-resolution: 2dppx) {
+  window[sharingvideo] > #audioVideoButton {
+    background-image: url("webRTC-camera-white-16@2x.png");
+  }
+
+  window[sharingaudio] > #audioVideoButton {
+    background-image: url("webRTC-microphone-white-16@2x.png");
+  }
+
+  /* Multi-icon button: */
+  window[sharingaudio][sharingvideo] > #audioVideoButton {
+    background-image: url("webRTC-camera-white-16@2x.png"),
+                      url("webRTC-microphone-white-16@2x.png");
+  }
+}
+%endif
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6b5c107d985040019f8233866df74ae5b4d676b1
GIT binary patch
literal 1268
zc$|Gye`p(Z6hGP8YO&hUf^A`XUIz}^%YE;1m;2GiHOr-I)MPQsSpHFSx%*yvruW0k
zbx9)w?TS-Ww&Fh(#8s@@Kx*AYoz79q2GfCM&L50|i0HOIbk-?S!D0O-ZR(K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HaB}JV=mGgxBLCDib)`|x-CsD}JFvU=)x(Y6)q(3h_ZRN&U7Y&q
zR_2SN-96neiQOYtuDnLynOol1==tmUH<$7|@0t3+54t;lyb}<k3mM||CodNIs7s$D
PKa_H5viRBf*>nE_jme50
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -93,16 +93,20 @@ browser.jar:
         skin/classic/browser/webRTC-shareDevice-64.png
         skin/classic/browser/webRTC-sharingDevice-16.png
         skin/classic/browser/webRTC-shareMicrophone-16.png
         skin/classic/browser/webRTC-shareMicrophone-64.png
         skin/classic/browser/webRTC-sharingMicrophone-16.png
         skin/classic/browser/webRTC-shareScreen-16.png               (../shared/webrtc/webRTC-shareScreen-16.png)
         skin/classic/browser/webRTC-shareScreen-64.png               (../shared/webrtc/webRTC-shareScreen-64.png)
         skin/classic/browser/webRTC-sharingScreen-16.png             (../shared/webrtc/webRTC-sharingScreen-16.png)
+*       skin/classic/browser/webRTC-indicator.css                    (../shared/webrtc/indicator.css)
+        skin/classic/browser/webRTC-camera-white-16.png              (../shared/webrtc/camera-white-16.png)
+        skin/classic/browser/webRTC-microphone-white-16.png          (../shared/webrtc/microphone-white-16.png)
+        skin/classic/browser/webRTC-screen-white-16.png              (../shared/webrtc/screen-white-16.png)
         skin/classic/browser/customizableui/background-noise-toolbar.png  (customizableui/background-noise-toolbar.png)
         skin/classic/browser/customizableui/customizeFavicon.ico  (../shared/customizableui/customizeFavicon.ico)
         skin/classic/browser/customizableui/customize-illustration.png  (../shared/customizableui/customize-illustration.png)
         skin/classic/browser/customizableui/customize-illustration-rtl.png  (../shared/customizableui/customize-illustration-rtl.png)
         skin/classic/browser/customizableui/customize-titleBar-toggle.png  (customizableui/customize-titleBar-toggle.png)
         skin/classic/browser/customizableui/customizeMode-gridTexture.png  (customizableui/customizeMode-gridTexture.png)
         skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png  (customizableui/customizeMode-separatorHorizontal.png)
         skin/classic/browser/customizableui/customizeMode-separatorVertical.png  (customizableui/customizeMode-separatorVertical.png)
@@ -505,16 +509,20 @@ browser.jar:
         skin/classic/aero/browser/webRTC-shareDevice-64.png
         skin/classic/aero/browser/webRTC-sharingDevice-16.png
         skin/classic/aero/browser/webRTC-shareMicrophone-16.png
         skin/classic/aero/browser/webRTC-shareMicrophone-64.png
         skin/classic/aero/browser/webRTC-sharingMicrophone-16.png
         skin/classic/aero/browser/webRTC-shareScreen-16.png               (../shared/webrtc/webRTC-shareScreen-16.png)
         skin/classic/aero/browser/webRTC-shareScreen-64.png               (../shared/webrtc/webRTC-shareScreen-64.png)
         skin/classic/aero/browser/webRTC-sharingScreen-16.png             (../shared/webrtc/webRTC-sharingScreen-16.png)
+*       skin/classic/aero/browser/webRTC-indicator.css                    (../shared/webrtc/indicator.css)
+        skin/classic/aero/browser/webRTC-camera-white-16.png              (../shared/webrtc/camera-white-16.png)
+        skin/classic/aero/browser/webRTC-microphone-white-16.png          (../shared/webrtc/microphone-white-16.png)
+        skin/classic/aero/browser/webRTC-screen-white-16.png              (../shared/webrtc/screen-white-16.png)
         skin/classic/aero/browser/customizableui/background-noise-toolbar.png  (customizableui/background-noise-toolbar.png)
         skin/classic/aero/browser/customizableui/customize-illustration.png  (../shared/customizableui/customize-illustration.png)
         skin/classic/aero/browser/customizableui/customize-illustration-rtl.png  (../shared/customizableui/customize-illustration-rtl.png)
         skin/classic/aero/browser/customizableui/customize-titleBar-toggle.png  (customizableui/customize-titleBar-toggle.png)
         skin/classic/aero/browser/customizableui/customizeFavicon.ico  (../shared/customizableui/customizeFavicon.ico)
         skin/classic/aero/browser/customizableui/customizeMode-gridTexture.png  (customizableui/customizeMode-gridTexture.png)
         skin/classic/aero/browser/customizableui/customizeMode-separatorHorizontal.png  (customizableui/customizeMode-separatorHorizontal.png)
         skin/classic/aero/browser/customizableui/customizeMode-separatorVertical.png  (customizableui/customizeMode-separatorVertical.png)