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 * @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 30 matching lines...) Expand all Loading... |
41 searchTerm: { | 41 searchTerm: { |
42 type: String, | 42 type: String, |
43 value: '' | 43 value: '' |
44 }, | 44 }, |
45 | 45 |
46 // True if it's searching at the backend. | 46 // True if it's searching at the backend. |
47 searching: { | 47 searching: { |
48 type: Boolean, | 48 type: Boolean, |
49 value: false | 49 value: false |
50 }, | 50 }, |
51 | |
52 // True if the page has a sidebar that we need to account for when | |
53 // positioning toolbar items. | |
54 hasSidebar: { | |
55 type: Boolean, | |
56 value: false, | |
57 reflectToAttribute: true | |
58 } | |
59 }, | 51 }, |
60 | 52 |
61 /** | 53 /** |
62 * Changes the toolbar background color depending on whether any history items | 54 * Changes the toolbar background color depending on whether any history items |
63 * are currently selected. | 55 * are currently selected. |
64 * @private | 56 * @private |
65 */ | 57 */ |
66 changeToolbarView_: function() { | 58 changeToolbarView_: function() { |
67 this.itemsSelected_ = this.count > 0; | 59 this.itemsSelected_ = this.count > 0; |
68 }, | 60 }, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 * @private | 111 * @private |
120 */ | 112 */ |
121 deletingAllowed_: function() { | 113 deletingAllowed_: function() { |
122 return loadTimeData.getBoolean('allowDeletingHistory'); | 114 return loadTimeData.getBoolean('allowDeletingHistory'); |
123 }, | 115 }, |
124 | 116 |
125 numberOfItemsSelected_: function(count) { | 117 numberOfItemsSelected_: function(count) { |
126 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; | 118 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; |
127 } | 119 } |
128 }); | 120 }); |
OLD | NEW |