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

Side by Side Diff: chrome/browser/resources/md_history/history_toolbar.js

Issue 2341923005: MD WebUI: Make cr-lazy-render get() synchronous (Closed)
Patch Set: Rebase Created 4 years, 3 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
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 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
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/app.crisper.js ('k') | chrome/browser/resources/md_history/list_container.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698