Verified Commit 163a9771 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃 Committed by boklm
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 f472d735
Loading
Loading
Loading
Loading
+5 −0
Changes for browser/base/content/browser-init.js: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -312,6 +312,9 @@ var gBrowserInit = {
      window
    );

    // 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
@@ -1124,6 +1127,8 @@ var gBrowserInit = {
      gBrowser.removeTabsProgressListener(window.TabsProgressListener);
    } catch (ex) {}

    SecurityLevelButton.uninit();

    // LinkPreview.sys.mjs is missing. tor-browser#44045.

    BrowserUtils.callModulesFromCategory(
+5 −0
Changes for browser/base/content/browser.js: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -271,6 +271,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
Changes for browser/base/content/browser.js.globals: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -238,5 +238,6 @@
  "ProfilesDatastoreService",
  "gTrustPanelHandler",
  "ContentSharingUtils",
  "Referrals"
  "Referrals",
  "SecurityLevelButton"
]
+3 −0
Changes for browser/base/content/browser.xhtml: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -58,6 +58,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
Changes for browser/base/content/main-popupset.inc.xhtml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -865,6 +865,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