Verified Commit 0d2dc8b0 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

Bug 40926: Implemented the New Identity feature

parent 58949e55
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -55,6 +55,11 @@
                     key="key_privatebrowsing"
                     command="Tools:PrivateBrowsing"/>
      <toolbarseparator/>
      <toolbarbutton id="appMenu-new-identity"
                     class="subviewbutton"
                     data-l10n-id="appmenuitem-new-identity"
                     key="new-identity-key"/>
      <toolbarseparator/>
      <toolbarbutton id="appMenu-bookmarks-button"
                     class="subviewbutton subviewbutton-nav"
                     data-l10n-id="library-bookmarks-menu"
+4 −0
Original line number Diff line number Diff line
@@ -28,6 +28,10 @@
                <menuitem id="menu_newPrivateWindow"
                          command="Tools:PrivateBrowsing"
                          key="key_privatebrowsing" data-l10n-id="menu-file-new-private-window"/>
                <menuseparator/>
                <menuitem id="menu_newIdentity"
                          key="new-identity-key" data-l10n-id="menu-new-identity"/>
                <menuseparator/>
                <menuitem id="menu_openLocation"
                          hidden="true"
                          command="Browser:OpenLocation"
+1 −0
Original line number Diff line number Diff line
@@ -395,4 +395,5 @@
         modifiers="accel,alt"
         internal="true"/>
#endif
    <key id="new-identity-key" modifiers="accel shift" key="U" oncommand="NewIdentityButton.onCommand(event)"/>
  </keyset>
+11 −1
Original line number Diff line number Diff line
@@ -241,6 +241,11 @@ XPCOMUtils.defineLazyScriptGetter(
  ["SecurityLevelButton"],
  "chrome://browser/content/securitylevel/securityLevel.js"
);
XPCOMUtils.defineLazyScriptGetter(
  this,
  ["NewIdentityButton"],
  "chrome://browser/content/newidentity.js"
);
XPCOMUtils.defineLazyScriptGetter(
  this,
  "gEditItemOverlay",
@@ -1713,6 +1718,9 @@ var gBrowserInit = {
    // Init the SecuritySettingsButton
    SecurityLevelButton.init();

    // Init the NewIdentityButton
    NewIdentityButton.init();

    // Certain kinds of automigration rely on this notification to complete
    // their tasks BEFORE the browser window is shown. SessionStore uses it to
    // restore tabs into windows AFTER important parts like gMultiProcessBrowser
@@ -2484,6 +2492,8 @@ var gBrowserInit = {

    SecurityLevelButton.uninit();

    NewIdentityButton.uninit();

    if (gToolbarKeyNavEnabled) {
      ToolbarKeyboardNavigator.uninit();
    }
@@ -4536,7 +4546,7 @@ function OpenBrowserWindow(options) {
  var extraFeatures = "";
  if (options && options.private && PrivateBrowsingUtils.enabled) {
    extraFeatures = ",private";
    if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
    if (!PrivateBrowsingUtils.permanentPrivateBrowsing || options.private === "no-home") {
      // Force the new window to load about:privatebrowsing instead of the default home page
      defaultArgs = "about:privatebrowsing";
    }
+3 −0
Original line number Diff line number Diff line
@@ -590,6 +590,9 @@
                   ondragover="newWindowButtonObserver.onDragOver(event)"
                   ondragenter="newWindowButtonObserver.onDragOver(event)"/>

    <toolbarbutton id="new-identity-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                   data-l10n-id="toolbar-new-identity"/>

    <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                   observes="View:FullScreen"
                   type="checkbox"
Loading