| 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 cr.define('downloads', function() { | 5 cr.define('downloads', function() { |
| 6 var Toolbar = Polymer({ | 6 var Toolbar = Polymer({ |
| 7 is: 'downloads-toolbar', | 7 is: 'downloads-toolbar', |
| 8 | 8 |
| 9 properties: { | 9 properties: { |
| 10 downloadsShowing: { | 10 downloadsShowing: { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 /** @private */ | 59 /** @private */ |
| 60 onPaperDropdownClose_: function() { | 60 onPaperDropdownClose_: function() { |
| 61 window.removeEventListener('resize', assert(this.boundClose_)); | 61 window.removeEventListener('resize', assert(this.boundClose_)); |
| 62 }, | 62 }, |
| 63 | 63 |
| 64 /** | 64 /** |
| 65 * @param {!Event} e | 65 * @param {!Event} e |
| 66 * @private | 66 * @private |
| 67 */ | 67 */ |
| 68 onItemBlur_: function(e) { | 68 onItemBlur_: function(e) { |
| 69 var menu = /** @type {PaperMenuElement} */(this.$$('paper-menu')); | 69 var menu = /** @type {PaperMenuElement} */ (this.$$('paper-menu')); |
| 70 if (menu.items.indexOf(e.relatedTarget) >= 0) | 70 if (menu.items.indexOf(e.relatedTarget) >= 0) |
| 71 return; | 71 return; |
| 72 | 72 |
| 73 this.$.more.restoreFocusOnClose = false; | 73 this.$.more.restoreFocusOnClose = false; |
| 74 this.closeMoreActions_(); | 74 this.closeMoreActions_(); |
| 75 this.$.more.restoreFocusOnClose = true; | 75 this.$.more.restoreFocusOnClose = true; |
| 76 }, | 76 }, |
| 77 | 77 |
| 78 /** @private */ | 78 /** @private */ |
| 79 onPaperDropdownOpen_: function() { | 79 onPaperDropdownOpen_: function() { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 98 }, | 98 }, |
| 99 | 99 |
| 100 /** @private */ | 100 /** @private */ |
| 101 updateClearAll_: function() { | 101 updateClearAll_: function() { |
| 102 this.$$('paper-menu .clear-all').hidden = !this.canClearAll(); | 102 this.$$('paper-menu .clear-all').hidden = !this.canClearAll(); |
| 103 }, | 103 }, |
| 104 }); | 104 }); |
| 105 | 105 |
| 106 return {Toolbar: Toolbar}; | 106 return {Toolbar: Toolbar}; |
| 107 }); | 107 }); |
| OLD | NEW |