Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2514)

Unified Diff: chrome/browser/resources/options/managed_user_settings.js

Issue 12594029: Create interface to manage manual exceptions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Load the overlay only when managed users are available. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/managed_user_settings.js
diff --git a/chrome/browser/resources/options/managed_user_settings.js b/chrome/browser/resources/options/managed_user_settings.js
index b94cc959961e7e2a4238bc19fc5f19c1f0339108..c7731b4ec51525bec2588c75ae6485bd6d7043c3 100644
--- a/chrome/browser/resources/options/managed_user_settings.js
+++ b/chrome/browser/resources/options/managed_user_settings.js
@@ -59,6 +59,16 @@ cr.define('options', function() {
// Call base class implementation to start preference initialization.
SettingsDialog.prototype.initializePage.call(this);
+ $('manage-exceptions-button').onclick = function(event) {
+ var page = ManagedUserSettingsExceptionsArea.getInstance();
+ var url = page.name;
+
+ OptionsPage.navigateToPage('manualExceptions');
+ uber.invokeMethodOnParent('setPath', {path: url});
+ uber.invokeMethodOnParent('setTitle',
+ {title: loadTimeData.getString('manualExceptionsTabTitle')});
+ };
+
$('get-content-packs-button').onclick = function(event) {
window.open(loadTimeData.getString('getContentPacksURL'));
};
@@ -178,6 +188,28 @@ cr.define('options', function() {
}
};
+ /**
+ * Initializes an exceptions list.
+ * @param {Array} list An array of pairs, where the first element of each pair
+ * is the filter string, and the second is the setting (allow/block).
+ */
+ ManagedUserSettings.setManualExceptions = function(list) {
+ $('manual-exceptions').setManualExceptions(list);
+ };
+
+ /**
+ * The browser's response to a request to check the validity of a given URL
+ * pattern.
+ * @param {string} mode The browser mode.
+ * @param {string} pattern The pattern.
+ * @param {bool} valid Whether said pattern is valid in the context of
+ * a content exception setting.
+ */
+ ManagedUserSettings.patternValidityCheckComplete =
+ function(pattern, valid) {
+ $('manual-exceptions').patternValidityCheckComplete(pattern, valid);
+ };
+
// Export
return {
ManagedUserSettings: ManagedUserSettings,
« no previous file with comments | « chrome/browser/resources/options/managed_user_settings.html ('k') | chrome/browser/resources/options/options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698