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

Side by Side Diff: chrome/browser/resources/settings/site_settings_page/site_settings_page.js

Issue 2282603002: [HBD] Update MD SiteSettingsHandler to support 3 modes. (Closed)
Patch Set: fix comment Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-site-settings-page' is the settings page containing privacy and 7 * 'settings-site-settings-page' is the settings page containing privacy and
8 * security site settings. 8 * security site settings.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 this.setDefaultValue_(this.ContentSettingsTypes.PLUGINS, '#plugins'); 45 this.setDefaultValue_(this.ContentSettingsTypes.PLUGINS, '#plugins');
46 this.setDefaultValue_(this.ContentSettingsTypes.POPUPS, '#popups'); 46 this.setDefaultValue_(this.ContentSettingsTypes.POPUPS, '#popups');
47 this.setDefaultValue_(this.ContentSettingsTypes.PROTOCOL_HANDLERS, 47 this.setDefaultValue_(this.ContentSettingsTypes.PROTOCOL_HANDLERS,
48 '#handlers'); 48 '#handlers');
49 this.setDefaultValue_(this.ContentSettingsTypes.UNSANDBOXED_PLUGINS, 49 this.setDefaultValue_(this.ContentSettingsTypes.UNSANDBOXED_PLUGINS,
50 '#unsandboxedPlugins'); 50 '#unsandboxedPlugins');
51 }, 51 },
52 52
53 setDefaultValue_: function(category, id) { 53 setDefaultValue_: function(category, id) {
54 this.browserProxy.getDefaultValueForContentType( 54 this.browserProxy.getDefaultValueForContentType(
55 category).then(function(enabled) { 55 category).then(function(setting) {
56 var enabled = this.computeIsSettingEnabled(category, setting);
56 var description = this.computeCategoryDesc(category, enabled, false); 57 var description = this.computeCategoryDesc(category, enabled, false);
57 this.$$(id).innerText = description; 58 this.$$(id).innerText = description;
58 }.bind(this)); 59 }.bind(this));
59 }, 60 },
60 61
61 /** 62 /**
62 * Handles selection of a single category and navigates to the details for 63 * Handles selection of a single category and navigates to the details for
63 * that category. 64 * that category.
64 * @param {!Event} event The tap event. 65 * @param {!Event} event The tap event.
65 */ 66 */
66 onTapCategory: function(event) { 67 onTapCategory: function(event) {
67 var category = event.currentTarget.getAttribute('category'); 68 var category = event.currentTarget.getAttribute('category');
68 if (category == settings.ALL_SITES) 69 if (category == settings.ALL_SITES)
69 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL); 70 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL);
70 else 71 else
71 settings.navigateTo(this.computeCategoryRoute(category)); 72 settings.navigateTo(this.computeCategoryRoute(category));
72 }, 73 },
73 }); 74 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698