| 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 16 matching lines...) Expand all Loading... |
| 27 notify: true, | 27 notify: true, |
| 28 }, | 28 }, |
| 29 | 29 |
| 30 // True if the backend is processing and a spinner should be shown in the | 30 // True if the backend is processing and a spinner should be shown in the |
| 31 // toolbar. | 31 // toolbar. |
| 32 spinnerActive: { | 32 spinnerActive: { |
| 33 type: Boolean, | 33 type: Boolean, |
| 34 value: false | 34 value: false |
| 35 }, | 35 }, |
| 36 | 36 |
| 37 hasDrawer: { |
| 38 type: Boolean, |
| 39 observer: 'hasDrawerChanged_', |
| 40 reflectToAttribute: true, |
| 41 }, |
| 42 |
| 37 // Whether domain-grouped history is enabled. | 43 // Whether domain-grouped history is enabled. |
| 38 isGroupedMode: { | 44 isGroupedMode: { |
| 39 type: Boolean, | 45 type: Boolean, |
| 40 reflectToAttribute: true, | 46 reflectToAttribute: true, |
| 41 }, | 47 }, |
| 42 | 48 |
| 43 // The period to search over. Matches BrowsingHistoryHandler::Range. | 49 // The period to search over. Matches BrowsingHistoryHandler::Range. |
| 44 groupedRange: { | 50 groupedRange: { |
| 45 type: Number, | 51 type: Number, |
| 46 value: 0, | 52 value: 0, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 }, | 121 }, |
| 116 | 122 |
| 117 numberOfItemsSelected_: function(count) { | 123 numberOfItemsSelected_: function(count) { |
| 118 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; | 124 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; |
| 119 }, | 125 }, |
| 120 | 126 |
| 121 getHistoryInterval_: function(queryStartTime, queryEndTime) { | 127 getHistoryInterval_: function(queryStartTime, queryEndTime) { |
| 122 // TODO(calamity): Fix the format of these dates. | 128 // TODO(calamity): Fix the format of these dates. |
| 123 return loadTimeData.getStringF( | 129 return loadTimeData.getStringF( |
| 124 'historyInterval', queryStartTime, queryEndTime); | 130 'historyInterval', queryStartTime, queryEndTime); |
| 125 } | 131 }, |
| 132 |
| 133 /** @private */ |
| 134 hasDrawerChanged_: function() { |
| 135 this.updateStyles(); |
| 136 }, |
| 126 }); | 137 }); |
| OLD | NEW |