Verified Commit d38755c6 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 b3d6b11d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -222,6 +222,11 @@ XPCOMUtils.defineLazyScriptGetter(
  ["DownloadsButton", "DownloadsIndicatorView"],
  "chrome://browser/content/downloads/indicator.js"
);
XPCOMUtils.defineLazyScriptGetter(
  this,
  ["SecurityLevelButton"],
  "chrome://browser/content/securitylevel/securityLevel.js"
);
XPCOMUtils.defineLazyScriptGetter(
  this,
  "gEditItemOverlay",
@@ -1771,6 +1776,9 @@ var gBrowserInit = {
    // doesn't flicker as the window is being shown.
    DownloadsButton.init();

    // Init the SecuritySettingsButton
    SecurityLevelButton.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
@@ -2491,6 +2499,8 @@ var gBrowserInit = {

    DownloadsButton.uninit();

    SecurityLevelButton.uninit();

    gAccessibilityServiceIndicator.uninit();

    if (gToolbarKeyNavEnabled) {
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/securitylevel/securityLevelPanel.css"?>
<?xml-stylesheet href="chrome://browser/content/securitylevel/securityLevelButton.css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
+1 −0
Original line number Diff line number Diff line
@@ -534,6 +534,7 @@
#include ../../components/controlcenter/content/protectionsPanel.inc.xhtml
#include ../../components/downloads/content/downloadsPanel.inc.xhtml
#include ../../../devtools/startup/enableDevToolsPopup.inc.xhtml
#include ../../components/securitylevel/content/securityLevelPanel.inc.xhtml
#include browser-allTabsMenu.inc.xhtml

  <tooltip id="dynamic-shortcut-tooltip"
+2 −0
Original line number Diff line number Diff line
@@ -405,6 +405,8 @@
        </box>
      </toolbarbutton>

#include ../../components/securitylevel/content/securityLevelButton.inc.xhtml

      <toolbarbutton id="fxa-toolbar-menu-button" class="toolbarbutton-1 chromeclass-toolbar-additional subviewbutton-nav"
                     badged="true"
                     onmousedown="gSync.toggleAccountPanel(this, event)"
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ DIRS += [
    "resistfingerprinting",
    "screenshots",
    "search",
    "securitylevel",
    "sessionstore",
    "shell",
    "syncedtabs",
Loading