Skip to content
Snippets Groups Projects
Commit 713245b2 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

fixup! Bug 40926: Implemented the New Identity feature

Move to HTML stylesheets instead of XML ones to be coherent with
upstream.

Also, switch from XPCOMUtils to ChromeUtils.
parent 784bcad1
No related branches found
No related tags found
No related merge requests found
......@@ -6,11 +6,6 @@
<!-- based on resetProfile.xhtml -->
<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://global/content/commonDialog.css"?>
<?xml-stylesheet href="chrome://global/skin/commonDialog.css"?>
<?xml-stylesheet href="chrome://browser/content/newIdentityDialog.css"?>
<window
id="newIdentityDialogWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
......@@ -21,6 +16,20 @@
>
<dialog id="newIdentityDialog" buttons="accept,cancel" defaultButton="accept">
<linkset>
<html:link rel="stylesheet" href="chrome://global/skin/global.css" />
<html:link
rel="stylesheet"
href="chrome://global/content/commonDialog.css"
/>
<html:link
rel="stylesheet"
href="chrome://global/skin/commonDialog.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/content/newIdentityDialog.css"
/>
<html:link rel="localization" href="branding/brand.ftl" />
<html:link rel="localization" href="toolkit/global/base-browser.ftl" />
</linkset>
......
......@@ -4,7 +4,7 @@
// Use a lazy getter because NewIdentityButton is declared more than once
// otherwise.
XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => {
ChromeUtils.defineLazyGetter(this, "NewIdentityButton", () => {
// Logger adapted from CustomizableUI.jsm
const logger = (() => {
const { ConsoleAPI } = ChromeUtils.import(
......@@ -314,11 +314,10 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => {
clearPreferencesAndPermissions() {
logger.info("Clearing Content Preferences");
ChromeUtils.defineModuleGetter(
this,
"PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
PrivateBrowsingUtils:
"resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
});
const pbCtxt = PrivateBrowsingUtils.privacyContextFromWindow(window);
const cps = Cc["@mozilla.org/content-pref/service;1"].getService(
Ci.nsIContentPrefService2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment