| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |