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

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

Issue 1864023002: MD History: Add spinners when new data is loading or searching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: import paper-spinner in toolbar Created 4 years, 8 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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {SearchFieldDelegate} 7 * @implements {SearchFieldDelegate}
8 * @param {!HistoryToolbarElement} toolbar This history-toolbar. 8 * @param {!HistoryToolbarElement} toolbar This history-toolbar.
9 */ 9 */
10 function ToolbarSearchFieldDelegate(toolbar) { 10 function ToolbarSearchFieldDelegate(toolbar) {
(...skipping 23 matching lines...) Expand all
34 type: Boolean, 34 type: Boolean,
35 value: false, 35 value: false,
36 reflectToAttribute: true 36 reflectToAttribute: true
37 }, 37 },
38 38
39 // The most recent term entered in the search field. Updated incrementally 39 // The most recent term entered in the search field. Updated incrementally
40 // as the user types. 40 // as the user types.
41 searchTerm: { 41 searchTerm: {
42 type: String, 42 type: String,
43 value: '' 43 value: ''
44 },
45
46 // True if it's searching at the backend.
47 searching_: {
tsergeant 2016/04/18 01:26:36 Nit: Rename this to `searching` with no underscore
lshang 2016/04/22 01:25:03 Done.
48 type: Boolean,
49 value: false
44 } 50 }
45 }, 51 },
46 52
47 /** 53 /**
48 * Changes the toolbar background color depending on whether any history items 54 * Changes the toolbar background color depending on whether any history items
49 * are currently selected. 55 * are currently selected.
50 * @private 56 * @private
51 */ 57 */
52 changeToolbarView_: function() { 58 changeToolbarView_: function() {
53 this.itemsSelected_ = this.count > 0; 59 this.itemsSelected_ = this.count > 0;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 * @private 111 * @private
106 */ 112 */
107 deletingAllowed_: function() { 113 deletingAllowed_: function() {
108 return loadTimeData.getBoolean('allowDeletingHistory'); 114 return loadTimeData.getBoolean('allowDeletingHistory');
109 }, 115 },
110 116
111 numberOfItemsSelected_: function(count) { 117 numberOfItemsSelected_: function(count) {
112 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; 118 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : '';
113 } 119 }
114 }); 120 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698