Commit 32a1596d authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃 Committed by brizental
Browse files

BB 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 4813ab8b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -241,6 +241,9 @@ var gBrowserInit = {
    // doesn't flicker as the window is being shown.
    DownloadsButton.init();

    // Init the SecurityLevelButton
    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
@@ -1080,6 +1083,8 @@ var gBrowserInit = {

    DownloadsButton.uninit();

    SecurityLevelButton.uninit();

    if (gToolbarKeyNavEnabled) {
      ToolbarKeyboardNavigator.uninit();
    }
+5 −0
Original line number Diff line number Diff line
@@ -265,6 +265,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",
+2 −1
Original line number Diff line number Diff line
@@ -238,5 +238,6 @@
  "ActionsProviderContextualSearch",
  "ToolbarDropHandler",
  "ProfilesDatastoreService",
  "gTrustPanelHandler"
  "gTrustPanelHandler",
  "SecurityLevelButton"
]
+3 −0
Original line number Diff line number Diff line
@@ -55,6 +55,9 @@
    href="chrome://global/content/resistfingerprinting/letterboxing.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="browser/allTabsMenu.ftl"/>
  <link rel="localization" href="browser/appmenu.ftl"/>
+1 −0
Original line number Diff line number Diff line
@@ -645,6 +645,7 @@
#include ../../components/translations/content/selectTranslationsPanel.inc.xhtml
#include ../../components/translations/content/fullPageTranslationsPanel.inc.xhtml
#include ../../components/tabbrowser/content/browser-allTabsMenu.inc.xhtml
#include ../../components/securitylevel/content/securityLevelPanel.inc.xhtml

  <tooltip id="dynamic-shortcut-tooltip"/>

Loading