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

Bug 40925: Implemented the Security Level component

This component adds a new Security Level toolbar button which visually
indicates the current global security level via icon (as defined by the
extensions.torbutton.security_slider pref), a drop-down hanger with a
short description of the current security level, and a new section in
the about:preferences#privacy page where users can change their current
security level. In addition, the hanger and the preferences page will
show a visual warning when the user has modified prefs associated with
the security level and provide a one-click 'Restore Defaults' button to
get the user back on recommended settings.

Bug 40125: Expose Security Level pref in GeckoView
parent 78ff7115
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -219,6 +219,9 @@ var gBrowserInit = {
    // doesn't flicker as the window is being shown.
    // doesn't flicker as the window is being shown.
    DownloadsButton.init();
    DownloadsButton.init();


    // Init the SecurityLevelButton
    SecurityLevelButton.init();

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


    DownloadsButton.uninit();
    DownloadsButton.uninit();


    SecurityLevelButton.uninit();

    if (gToolbarKeyNavEnabled) {
    if (gToolbarKeyNavEnabled) {
      ToolbarKeyboardNavigator.uninit();
      ToolbarKeyboardNavigator.uninit();
    }
    }
+5 −0
Original line number Original line Diff line number Diff line
@@ -246,6 +246,11 @@ XPCOMUtils.defineLazyScriptGetter(
  ["DownloadsButton", "DownloadsIndicatorView"],
  ["DownloadsButton", "DownloadsIndicatorView"],
  "chrome://browser/content/downloads/indicator.js"
  "chrome://browser/content/downloads/indicator.js"
);
);
XPCOMUtils.defineLazyScriptGetter(
  this,
  ["SecurityLevelButton"],
  "chrome://browser/content/securitylevel/securityLevel.js"
);
XPCOMUtils.defineLazyScriptGetter(
XPCOMUtils.defineLazyScriptGetter(
  this,
  this,
  "gEditItemOverlay",
  "gEditItemOverlay",
+2 −1
Original line number Original line Diff line number Diff line
@@ -270,5 +270,6 @@
  "gFindBar",
  "gFindBar",
  "gFindBarInitialized",
  "gFindBarInitialized",
  "gFindBarPromise",
  "gFindBarPromise",
  "BrowserSearch"
  "BrowserSearch",
  "SecurityLevelButton"
]
]
+3 −0
Original line number Original line Diff line number Diff line
@@ -60,6 +60,9 @@
  <link rel="stylesheet" href="chrome://browser/skin/places/tree-icons.css" />
  <link rel="stylesheet" href="chrome://browser/skin/places/tree-icons.css" />
  <link rel="stylesheet" href="chrome://browser/skin/places/editBookmark.css" />
  <link rel="stylesheet" href="chrome://browser/skin/places/editBookmark.css" />


  <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelPanel.css" />
  <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelButton.css" />

  <link rel="localization" href="branding/brand.ftl"/>
  <link rel="localization" href="branding/brand.ftl"/>
  <link rel="localization" href="browser/allTabsMenu.ftl"/>
  <link rel="localization" href="browser/allTabsMenu.ftl"/>
  <link rel="localization" href="browser/appmenu.ftl"/>
  <link rel="localization" href="browser/appmenu.ftl"/>
+1 −0
Original line number Original line Diff line number Diff line
@@ -531,6 +531,7 @@
#include ../../components/translations/content/selectTranslationsPanel.inc.xhtml
#include ../../components/translations/content/selectTranslationsPanel.inc.xhtml
#include ../../components/translations/content/fullPageTranslationsPanel.inc.xhtml
#include ../../components/translations/content/fullPageTranslationsPanel.inc.xhtml
#include ../../components/tabbrowser/content/browser-allTabsMenu.inc.xhtml
#include ../../components/tabbrowser/content/browser-allTabsMenu.inc.xhtml
#include ../../components/securitylevel/content/securityLevelPanel.inc.xhtml


  <tooltip id="dynamic-shortcut-tooltip"
  <tooltip id="dynamic-shortcut-tooltip"
           onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
           onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
Loading