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

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: 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 28 matching lines...) Expand all
77 resetPermission: function() { 72 resetPermission: function() {
78 var pref = this.getPref( 73 var pref = this.getPref(
79 this.computeCategoryExceptionsPrefName(this.category)); 74 this.computeCategoryExceptionsPrefName(this.category));
80 delete pref.value[this.origin + ',' + this.origin]; 75 delete pref.value[this.origin + ',' + this.origin];
81 delete pref.value[this.origin + ',*']; 76 delete pref.value[this.origin + ',*'];
82 this.setPrefValue( 77 this.setPrefValue(
83 this.computeCategoryExceptionsPrefName(this.category), pref.value); 78 this.computeCategoryExceptionsPrefName(this.category), pref.value);
84 this.$.details.hidden = true; 79 this.$.details.hidden = true;
85 }, 80 },
86 }); 81 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698