| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 Polymer({ |
| 6 is: 'history-toolbar', |
| 7 properties: { |
| 8 // Number of history items currently selected. |
| 9 count: { |
| 10 type: Number, |
| 11 value: 0, |
| 12 observer: 'changeToolbarView_' |
| 13 }, |
| 14 // True if 1 or more history items are selected. When this value changes |
| 15 // the background colour changes. |
| 16 itemsSelected_: { |
| 17 type: Boolean, |
| 18 value: false, |
| 19 reflectToAttribute: true |
| 20 } |
| 21 }, |
| 22 |
| 23 /** |
| 24 * This function changes the toolbar background color depending on whether or |
| 25 * not any history items are currently selected. |
| 26 * @private |
| 27 */ |
| 28 changeToolbarView_: function() { |
| 29 this.itemsSelected_ = this.count != 0; |
| 30 }, |
| 31 |
| 32 clearSelection: function() { |
| 33 this.fire('unselect-all'); |
| 34 } |
| 35 }); |
| OLD | NEW |