Bug 1364238 - Add the sidebar button into the default toolbar set;r=Gijs draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Tue, 20 Jun 2017 08:42:28 -0700
changeset 597571 d6a48f28ccf3c89c211529b24e6a88c8018ee3ef
parent 597264 7a6baa6cca3292e8099e652b64d27e74df560874
child 634252 0713faaa36fa9a1e489082b57731bf937806f1dd
push id64957
push userbgrinstead@mozilla.com
push dateTue, 20 Jun 2017 17:01:16 +0000
reviewersGijs
bugs1364238
milestone56.0a1
Bug 1364238 - Add the sidebar button into the default toolbar set;r=Gijs MozReview-Commit-ID: 7Z0ukSPu6pL
browser/components/customizableui/CustomizableUI.jsm
browser/modules/BrowserUITelemetry.jsm
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -241,16 +241,19 @@ var CustomizableUIInternal = {
     let navbarPlacements = [
       "urlbar-container",
       "search-container",
       "bookmarks-menu-button",
       "downloads-button",
       "home-button",
     ];
 
+    if (AppConstants.MOZ_PHOTON_THEME) {
+      navbarPlacements.push("sidebar-button");
+    }
     if (AppConstants.MOZ_DEV_EDITION) {
       navbarPlacements.splice(2, 0, "developer-button");
     }
 
     // Place this last, when createWidget is called for pocket, it will
     // append to the toolbar.
     if (Services.prefs.getPrefType("extensions.pocket.enabled") != Services.prefs.PREF_INVALID &&
         Services.prefs.getBoolPref("extensions.pocket.enabled")) {
--- a/browser/modules/BrowserUITelemetry.jsm
+++ b/browser/modules/BrowserUITelemetry.jsm
@@ -71,16 +71,20 @@ XPCOMUtils.defineLazyGetter(this, "DEFAU
       "new-tab-button",
       "alltabs-button",
     ],
     "PersonalToolbar": [
       "personal-bookmarks",
     ],
   };
 
+  if (AppConstants.MOZ_PHOTON_THEME) {
+    result["nav-bar"].push("sidebar-button");
+  }
+
   if (gPhotonStructure) {
     result["widget-overflow-fixed-list"] = [];
   } else {
     result["PanelUI-contents"] = LEGACY_PANEL_PLACEMENTS;
     let showCharacterEncoding = Services.prefs.getComplexValue(
       "browser.menu.showCharacterEncoding",
       Ci.nsIPrefLocalizedString
     ).data;