| 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 * @fileoverview | 6 * @fileoverview |
| 7 * 'site-list' shows a list of Allowed and Blocked sites for a given | 7 * 'site-list' shows a list of Allowed and Blocked sites for a given |
| 8 * category. | 8 * category. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 }, | 109 }, |
| 110 | 110 |
| 111 /** | 111 /** |
| 112 * The element to return focus to, when the currently active dialog is closed. | 112 * The element to return focus to, when the currently active dialog is closed. |
| 113 * @private {?HTMLElement} | 113 * @private {?HTMLElement} |
| 114 */ | 114 */ |
| 115 activeDialogAnchor_: null, | 115 activeDialogAnchor_: null, |
| 116 | 116 |
| 117 observers: ['configureWidget_(category, categorySubtype)'], | 117 observers: ['configureWidget_(category, categorySubtype)'], |
| 118 | 118 |
| 119 /** @override */ |
| 119 ready: function() { | 120 ready: function() { |
| 120 this.addWebUIListener('contentSettingSitePermissionChanged', | 121 this.addWebUIListener('contentSettingSitePermissionChanged', |
| 121 this.siteWithinCategoryChanged_.bind(this)); | 122 this.siteWithinCategoryChanged_.bind(this)); |
| 122 this.addWebUIListener('onIncognitoStatusChanged', | 123 this.addWebUIListener('onIncognitoStatusChanged', |
| 123 this.onIncognitoStatusChanged_.bind(this)); | 124 this.onIncognitoStatusChanged_.bind(this)); |
| 124 }, | 125 }, |
| 125 | 126 |
| 126 /** | 127 /** |
| 127 * Called when a site changes permission. | 128 * Called when a site changes permission. |
| 128 * @param {string} category The category of the site that changed. | 129 * @param {string} category The category of the site that changed. |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 /** @private */ | 495 /** @private */ |
| 495 closeActionMenu_: function() { | 496 closeActionMenu_: function() { |
| 496 this.actionMenuSite_ = null; | 497 this.actionMenuSite_ = null; |
| 497 this.activeDialogAnchor_ = null; | 498 this.activeDialogAnchor_ = null; |
| 498 var actionMenu = /** @type {!CrActionMenuElement} */ ( | 499 var actionMenu = /** @type {!CrActionMenuElement} */ ( |
| 499 this.$$('dialog[is=cr-action-menu]')); | 500 this.$$('dialog[is=cr-action-menu]')); |
| 500 if (actionMenu.open) | 501 if (actionMenu.open) |
| 501 actionMenu.close(); | 502 actionMenu.close(); |
| 502 }, | 503 }, |
| 503 }); | 504 }); |
| OLD | NEW |