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

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

Issue 2749023008: [MD settings] edit content settings exceptions (Closed)
Patch Set: 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 * @private 384 * @private
385 */ 385 */
386 setUpActionMenu_: function() { 386 setUpActionMenu_: function() {
387 this.showAllowAction_ = 387 this.showAllowAction_ =
388 this.categorySubtype != settings.PermissionValues.ALLOW; 388 this.categorySubtype != settings.PermissionValues.ALLOW;
389 this.showBlockAction_ = 389 this.showBlockAction_ =
390 this.categorySubtype != settings.PermissionValues.BLOCK; 390 this.categorySubtype != settings.PermissionValues.BLOCK;
391 this.showSessionOnlyAction_ = 391 this.showSessionOnlyAction_ =
392 this.categorySubtype != settings.PermissionValues.SESSION_ONLY && 392 this.categorySubtype != settings.PermissionValues.SESSION_ONLY &&
393 this.category == settings.ContentSettingsTypes.COOKIES; 393 this.category == settings.ContentSettingsTypes.COOKIES;
394 /* Note: the following types are intentinally omitted: CAMERA, GEOLOCATION,
395 * MIC, MIDI_DEVICES, PROTECTED_CONTENT, PROTOCOL_HANDLERS, USB_DEVICES,
396 * ZOOM_LEVELS. */
394 this.showEditAction_ = 397 this.showEditAction_ =
395 this.category == settings.ContentSettingsTypes.COOKIES; 398 this.category == settings.ContentSettingsTypes.AUTOMATIC_DOWNLOADS ||
399 this.category == settings.ContentSettingsTypes.BACKGROUND_SYNC ||
400 this.category == settings.ContentSettingsTypes.COOKIES ||
401 this.category == settings.ContentSettingsTypes.IMAGES ||
402 this.category == settings.ContentSettingsTypes.JAVASCRIPT ||
403 this.category == settings.ContentSettingsTypes.NOTIFICATIONS ||
404 this.category == settings.ContentSettingsTypes.PLUGINS ||
405 this.category == settings.ContentSettingsTypes.POPUPS ||
406 this.category == settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS;
dschuyler 2017/03/18 00:36:11 Hmm, I could convert this to a dictionary and to a
396 }, 407 },
397 408
398 /** 409 /**
399 * @return {boolean} Whether to show the "Session Only" menu item for the 410 * @return {boolean} Whether to show the "Session Only" menu item for the
400 * currently active site. 411 * currently active site.
401 * @private 412 * @private
402 */ 413 */
403 showSessionOnlyActionForSite_: function() { 414 showSessionOnlyActionForSite_: function() {
404 // It makes no sense to show "clear on exit" for exceptions that only apply 415 // 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 416 // to incognito. It gives the impression that they might under some
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 523
513 /** @private */ 524 /** @private */
514 closeActionMenu_: function() { 525 closeActionMenu_: function() {
515 this.actionMenuSite_ = null; 526 this.actionMenuSite_ = null;
516 var actionMenu = /** @type {!CrActionMenuElement} */ ( 527 var actionMenu = /** @type {!CrActionMenuElement} */ (
517 this.$$('dialog[is=cr-action-menu]')); 528 this.$$('dialog[is=cr-action-menu]'));
518 if (actionMenu.open) 529 if (actionMenu.open)
519 actionMenu.close(); 530 actionMenu.close();
520 }, 531 },
521 }); 532 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698