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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_details_permission.js

Issue 2190243002: [MD settings] update site details permission layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test fix Created 4 years, 4 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 * 'site-details-permission' handles showing the state of one permission, such 7 * 'site-details-permission' handles showing the state of one permission, such
8 * as Geolocation, for a given origin. 8 * as Geolocation, for a given origin.
9 */ 9 */
10 Polymer({ 10 Polymer({
11 is: 'site-details-permission', 11 is: 'site-details-permission',
12 12
13 behaviors: [SiteSettingsBehavior, WebUIListenerBehavior], 13 behaviors: [SiteSettingsBehavior, WebUIListenerBehavior],
14 14
15 properties: { 15 properties: {
16 /** 16 /**
17 * The site that this widget is showing details for. 17 * The site that this widget is showing details for.
18 * @type {SiteException} 18 * @type {SiteException}
19 */ 19 */
20 site: Object, 20 site: Object,
21
22 i18n_: {
23 readOnly: true,
24 type: Object,
25 value: function() {
26 return {
27 allowAction: loadTimeData.getString('siteSettingsActionAllow'),
28 blockAction: loadTimeData.getString('siteSettingsActionBlock'),
29 };
30 },
31 },
32 }, 21 },
33 22
34 observers: ['siteChanged_(site, category)'], 23 observers: ['siteChanged_(site, category)'],
35 24
36 /** @override */ 25 /** @override */
37 attached: function() { 26 attached: function() {
38 this.addWebUIListener('contentSettingSitePermissionChanged', 27 this.addWebUIListener('contentSettingSitePermissionChanged',
39 this.sitePermissionChanged_.bind(this)); 28 this.sitePermissionChanged_.bind(this));
40 }, 29 },
41 30
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 /** 90 /**
102 * Handles the category permission changing for this origin. 91 * Handles the category permission changing for this origin.
103 * @param {!{detail: !{item: !{dataset: !{permissionValue: string}}}}} event 92 * @param {!{detail: !{item: !{dataset: !{permissionValue: string}}}}} event
104 */ 93 */
105 onPermissionMenuIronActivate_: function(event) { 94 onPermissionMenuIronActivate_: function(event) {
106 var value = event.detail.item.dataset.permissionValue; 95 var value = event.detail.item.dataset.permissionValue;
107 this.setCategoryPermissionForOrigin( 96 this.setCategoryPermissionForOrigin(
108 this.site.origin, '', this.category, value); 97 this.site.origin, '', this.category, value);
109 }, 98 },
110 }); 99 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698