Chromium Code Reviews| 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 count: { | 9 count: { |
| 10 type: Number, | 10 type: Number, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 }, | 89 }, |
| 90 | 90 |
| 91 onClearSelectionTap_: function() { | 91 onClearSelectionTap_: function() { |
| 92 this.fire('unselect-all'); | 92 this.fire('unselect-all'); |
| 93 }, | 93 }, |
| 94 | 94 |
| 95 onDeleteTap_: function() { | 95 onDeleteTap_: function() { |
| 96 this.fire('delete-selected'); | 96 this.fire('delete-selected'); |
| 97 }, | 97 }, |
| 98 | 98 |
| 99 onFindCommand: function() { | |
|
tsergeant
2016/07/05 07:47:22
Since there's nothing about this function that tie
lshang
2016/07/06 05:03:08
Done.
| |
| 100 this.$['main-toolbar'].$['search'].showAndFocus(); | |
|
tsergeant
2016/07/05 07:47:22
Use
this.$['main-toolbar'].getSearchField().showA
lshang
2016/07/06 05:03:08
Done. Good point!
| |
| 101 }, | |
| 102 | |
| 99 /** | 103 /** |
| 100 * If the user is a supervised user the delete button is not shown. | 104 * If the user is a supervised user the delete button is not shown. |
| 101 * @private | 105 * @private |
| 102 */ | 106 */ |
| 103 deletingAllowed_: function() { | 107 deletingAllowed_: function() { |
| 104 return loadTimeData.getBoolean('allowDeletingHistory'); | 108 return loadTimeData.getBoolean('allowDeletingHistory'); |
| 105 }, | 109 }, |
| 106 | 110 |
| 107 numberOfItemsSelected_: function(count) { | 111 numberOfItemsSelected_: function(count) { |
| 108 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; | 112 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; |
| 109 }, | 113 }, |
| 110 | 114 |
| 111 getHistoryInterval_: function(queryStartTime, queryEndTime) { | 115 getHistoryInterval_: function(queryStartTime, queryEndTime) { |
| 112 // TODO(calamity): Fix the format of these dates. | 116 // TODO(calamity): Fix the format of these dates. |
| 113 return loadTimeData.getStringF( | 117 return loadTimeData.getStringF( |
| 114 'historyInterval', queryStartTime, queryEndTime); | 118 'historyInterval', queryStartTime, queryEndTime); |
| 115 } | 119 } |
| 116 }); | 120 }); |
| OLD | NEW |