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

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

Issue 2749023008: [MD settings] edit content settings exceptions (Closed)
Patch Set: unit tests Created 3 years, 9 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 * Enumeration mapping all possible controlled-by values for exceptions to 6 * Enumeration mapping all possible controlled-by values for exceptions to
7 * icons. 7 * icons.
8 * @enum {string} 8 * @enum {string}
9 */ 9 */
10 var iconControlledBy = { 10 var iconControlledBy = {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 showBlockAction_: Boolean, 96 showBlockAction_: Boolean,
97 97
98 /** 98 /**
99 * Whether to show the 'Clear on exit' action in the action 99 * Whether to show the 'Clear on exit' action in the action
100 * menu. 100 * menu.
101 * @private 101 * @private
102 */ 102 */
103 showSessionOnlyAction_: Boolean, 103 showSessionOnlyAction_: Boolean,
104 104
105 /** 105 /**
106 * Whether to show the 'edit' action in the action menu.
107 * @private
108 */
109 showEditAction_: Boolean,
110
111 /**
112 * Keeps track of the incognito status of the current profile (whether one 106 * Keeps track of the incognito status of the current profile (whether one
113 * exists). 107 * exists).
114 * @private 108 * @private
115 */ 109 */
116 incognitoProfileActive_: { 110 incognitoProfileActive_: {
117 type: Boolean, 111 type: Boolean,
118 value: false, 112 value: false,
119 }, 113 },
120 114
121 /** 115 /**
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 * @private 378 * @private
385 */ 379 */
386 setUpActionMenu_: function() { 380 setUpActionMenu_: function() {
387 this.showAllowAction_ = 381 this.showAllowAction_ =
388 this.categorySubtype != settings.PermissionValues.ALLOW; 382 this.categorySubtype != settings.PermissionValues.ALLOW;
389 this.showBlockAction_ = 383 this.showBlockAction_ =
390 this.categorySubtype != settings.PermissionValues.BLOCK; 384 this.categorySubtype != settings.PermissionValues.BLOCK;
391 this.showSessionOnlyAction_ = 385 this.showSessionOnlyAction_ =
392 this.categorySubtype != settings.PermissionValues.SESSION_ONLY && 386 this.categorySubtype != settings.PermissionValues.SESSION_ONLY &&
393 this.category == settings.ContentSettingsTypes.COOKIES; 387 this.category == settings.ContentSettingsTypes.COOKIES;
394 this.showEditAction_ =
395 this.category == settings.ContentSettingsTypes.COOKIES;
396 }, 388 },
397 389
398 /** 390 /**
399 * @return {boolean} Whether to show the "Session Only" menu item for the 391 * @return {boolean} Whether to show the "Session Only" menu item for the
400 * currently active site. 392 * currently active site.
401 * @private 393 * @private
402 */ 394 */
403 showSessionOnlyActionForSite_: function() { 395 showSessionOnlyActionForSite_: function() {
404 // It makes no sense to show "clear on exit" for exceptions that only apply 396 // It makes no sense to show "clear on exit" for exceptions that only apply
405 // to incognito. It gives the impression that they might under some 397 // to incognito. It gives the impression that they might under some
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 504
513 /** @private */ 505 /** @private */
514 closeActionMenu_: function() { 506 closeActionMenu_: function() {
515 this.actionMenuSite_ = null; 507 this.actionMenuSite_ = null;
516 var actionMenu = /** @type {!CrActionMenuElement} */ ( 508 var actionMenu = /** @type {!CrActionMenuElement} */ (
517 this.$$('dialog[is=cr-action-menu]')); 509 this.$$('dialog[is=cr-action-menu]'));
518 if (actionMenu.open) 510 if (actionMenu.open)
519 actionMenu.close(); 511 actionMenu.close();
520 }, 512 },
521 }); 513 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698