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

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

Issue 1477773003: Use dom-if to hide settings pages and show explicitly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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 * Example: 10 * Example:
(...skipping 13 matching lines...) Expand all
24 properties: { 24 properties: {
25 /** 25 /**
26 * Preferences state. 26 * Preferences state.
27 */ 27 */
28 prefs: { 28 prefs: {
29 type: Object, 29 type: Object,
30 notify: true, 30 notify: true,
31 }, 31 },
32 32
33 /** 33 /**
34 * The ID of the category this widget is displaying data for.
35 */
36 category: Number,
37
38 /**
39 * The origin, which this permission affects. 34 * The origin, which this permission affects.
40 */ 35 */
41 origin: { 36 origin: {
42 type: String, 37 type: String,
43 observer: 'initialize_', 38 observer: 'initialize_',
44 }, 39 },
45 40
46 i18n_: { 41 i18n_: {
47 readOnly: true, 42 readOnly: true,
48 type: Object, 43 type: Object,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 * @param {!{target: !{selectedItem: !{innerText: string}}}} event 82 * @param {!{target: !{selectedItem: !{innerText: string}}}} event
88 */ 83 */
89 onPermissionMenuIronSelect_: function(event) { 84 onPermissionMenuIronSelect_: function(event) {
90 var action = event.target.selectedItem.innerText; 85 var action = event.target.selectedItem.innerText;
91 var value = (action == this.i18n_.allowAction) ? 86 var value = (action == this.i18n_.allowAction) ?
92 settings.PermissionValues.ALLOW : 87 settings.PermissionValues.ALLOW :
93 settings.PermissionValues.BLOCK; 88 settings.PermissionValues.BLOCK;
94 this.setCategoryPermissionForOrigin(this.origin, value, this.category); 89 this.setCategoryPermissionForOrigin(this.origin, value, this.category);
95 }, 90 },
96 }); 91 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/settings_resources.grd ('k') | chrome/browser/resources/settings/site_settings/site_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698