| 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 Polymer({ | 5 Polymer({ |
| 6 is: 'history-toolbar', | 6 is: 'history-toolbar', |
| 7 properties: { | 7 properties: { |
| 8 // Number of history items currently selected. | 8 // Number of history items currently selected. |
| 9 // TODO(calamity): bind this to | 9 // TODO(calamity): bind this to |
| 10 // listContainer.selectedItem.selectedPaths.length. | 10 // listContainer.selectedItem.selectedPaths.length. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 /** | 93 /** |
| 94 * @param {!CustomEvent} event | 94 * @param {!CustomEvent} event |
| 95 * @private | 95 * @private |
| 96 */ | 96 */ |
| 97 onSearchChanged_: function(event) { | 97 onSearchChanged_: function(event) { |
| 98 this.searchTerm = /** @type {string} */ (event.detail); | 98 this.searchTerm = /** @type {string} */ (event.detail); |
| 99 }, | 99 }, |
| 100 | 100 |
| 101 /** @private */ | 101 /** @private */ |
| 102 onInfoButtonTap_: function() { | 102 onInfoButtonTap_: function() { |
| 103 this.$.syncNotice.get().then(function(dropdown) { | 103 var dropdown = this.$.syncNotice.get(); |
| 104 dropdown.positionTarget = this.$$('#info-button-icon'); | 104 dropdown.positionTarget = this.$$('#info-button-icon'); |
| 105 // It is possible for this listener to trigger while the dialog is | 105 // It is possible for this listener to trigger while the dialog is |
| 106 // closing. Ensure the dialog is fully closed before reopening it. | 106 // closing. Ensure the dialog is fully closed before reopening it. |
| 107 if (dropdown.style.display == 'none') | 107 if (dropdown.style.display == 'none') |
| 108 dropdown.open(); | 108 dropdown.open(); |
| 109 }.bind(this)); | |
| 110 }, | 109 }, |
| 111 | 110 |
| 112 onClearSelectionTap_: function() { | 111 onClearSelectionTap_: function() { |
| 113 this.fire('unselect-all'); | 112 this.fire('unselect-all'); |
| 114 }, | 113 }, |
| 115 | 114 |
| 116 onDeleteTap_: function() { | 115 onDeleteTap_: function() { |
| 117 this.fire('delete-selected'); | 116 this.fire('delete-selected'); |
| 118 }, | 117 }, |
| 119 | 118 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 143 // TODO(calamity): Fix the format of these dates. | 142 // TODO(calamity): Fix the format of these dates. |
| 144 return loadTimeData.getStringF( | 143 return loadTimeData.getStringF( |
| 145 'historyInterval', queryStartTime, queryEndTime); | 144 'historyInterval', queryStartTime, queryEndTime); |
| 146 }, | 145 }, |
| 147 | 146 |
| 148 /** @private */ | 147 /** @private */ |
| 149 hasDrawerChanged_: function() { | 148 hasDrawerChanged_: function() { |
| 150 this.updateStyles(); | 149 this.updateStyles(); |
| 151 }, | 150 }, |
| 152 }); | 151 }); |
| OLD | NEW |