From c2e781d76126fed594f0b811f84a6467c9e10392 Mon Sep 17 00:00:00 2001 From: Paolo Amadini Date: Fri, 8 Jan 2016 14:11:38 +0000 Subject: [PATCH] Bug 1231375 - Add a dialog to manage DNT settings. r=past --- browser/components/preferences/donottrack.xul | 35 +++++++++++++++++++ .../preferences/in-content/privacy.js | 12 +++++++ .../preferences/in-content/privacy.xul | 21 +++-------- browser/components/preferences/jar.mn | 1 + .../chrome/browser/preferences/donottrack.dtd | 12 +++++++ .../chrome/browser/preferences/privacy.dtd | 9 +++-- browser/locales/jar.mn | 1 + .../shared/incontentprefs/preferences.inc.css | 2 +- 8 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 browser/components/preferences/donottrack.xul create mode 100644 browser/locales/en-US/chrome/browser/preferences/donottrack.dtd diff --git a/browser/components/preferences/donottrack.xul b/browser/components/preferences/donottrack.xul new file mode 100644 index 0000000000000..40f0aacebbea7 --- /dev/null +++ b/browser/components/preferences/donottrack.xul @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/browser/components/preferences/in-content/privacy.js b/browser/components/preferences/in-content/privacy.js index 3ec0afe9c27a0..ac48c5152bdee 100644 --- a/browser/components/preferences/in-content/privacy.js +++ b/browser/components/preferences/in-content/privacy.js @@ -108,6 +108,10 @@ var gPrivacyPane = { gPrivacyPane.clearPrivateDataNow(true); return false; }); + setEventListener("doNotTrackSettings", "click", function () { + gPrivacyPane.showDoNotTrackSettings(); + return false; + }); setEventListener("privateBrowsingAutoStart", "command", gPrivacyPane.updateAutostart); setEventListener("cookieExceptions", "command", @@ -386,6 +390,14 @@ var gPrivacyPane = { null, params); }, + /** + * Displays the Do Not Track settings dialog. + */ + showDoNotTrackSettings() { + gSubDialog.open("chrome://browser/content/preferences/donottrack.xul", + "resizable=no"); + }, + // HISTORY /* diff --git a/browser/components/preferences/in-content/privacy.xul b/browser/components/preferences/in-content/privacy.xul index beb1800d28915..6812b825de3fd 100644 --- a/browser/components/preferences/in-content/privacy.xul +++ b/browser/components/preferences/in-content/privacy.xul @@ -10,9 +10,6 @@