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

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

Issue 2739693002: MD Settings: Close action menu when opening edit cookie exception dialog. (Closed)
Patch Set: Add test assertion. 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
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/site_list_tests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 }, 442 },
443 443
444 /** @private */ 444 /** @private */
445 onSessionOnlyTap_: function() { 445 onSessionOnlyTap_: function() {
446 this.onActionMenuActivate_(settings.PermissionValues.SESSION_ONLY); 446 this.onActionMenuActivate_(settings.PermissionValues.SESSION_ONLY);
447 this.closeActionMenu_(); 447 this.closeActionMenu_();
448 }, 448 },
449 449
450 /** @private */ 450 /** @private */
451 onEditTap_: function() { 451 onEditTap_: function() {
452 // Close action menu without resetting |this.actionMenuSite_| since it is
453 // bound to the dialog.
454 /** @type {!CrActionMenuElement} */ (
455 this.$$('dialog[is=cr-action-menu]')).close();
452 this.showEditExceptionDialog_ = true; 456 this.showEditExceptionDialog_ = true;
453 }, 457 },
454 458
455 /** @private */ 459 /** @private */
456 onEditExceptionDialogClosed_: function() { 460 onEditExceptionDialogClosed_: function() {
457 this.showEditExceptionDialog_ = false; 461 this.showEditExceptionDialog_ = false;
458 // Close action menu after dialog has been closed, otherwise 462 this.actionMenuSite_ = null;
459 // |actionMenuSite_| is reset while the dialog is still accessing it.
460 this.closeActionMenu_();
461 }, 463 },
462 464
463 /** @private */ 465 /** @private */
464 onResetTap_: function() { 466 onResetTap_: function() {
465 this.onActionMenuActivate_(settings.PermissionValues.DEFAULT); 467 this.onActionMenuActivate_(settings.PermissionValues.DEFAULT);
466 this.closeActionMenu_(); 468 this.closeActionMenu_();
467 }, 469 },
468 470
469 /** 471 /**
470 * Returns the appropriate site description to display. This can, for example, 472 * Returns the appropriate site description to display. This can, for example,
(...skipping 27 matching lines...) Expand all
498 500
499 /** @private */ 501 /** @private */
500 closeActionMenu_: function() { 502 closeActionMenu_: function() {
501 this.actionMenuSite_ = null; 503 this.actionMenuSite_ = null;
502 var actionMenu = /** @type {!CrActionMenuElement} */ ( 504 var actionMenu = /** @type {!CrActionMenuElement} */ (
503 this.$$('dialog[is=cr-action-menu]')); 505 this.$$('dialog[is=cr-action-menu]'));
504 if (actionMenu.open) 506 if (actionMenu.open)
505 actionMenu.close(); 507 actionMenu.close();
506 }, 508 },
507 }); 509 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/site_list_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698