| Index: chrome/browser/resources/md_history/history_toolbar.js
|
| diff --git a/chrome/browser/resources/md_history/history_toolbar.js b/chrome/browser/resources/md_history/history_toolbar.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..38b1c12e8c71d2c9fe514f087409b95dce27112b
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/md_history/history_toolbar.js
|
| @@ -0,0 +1,35 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +Polymer({
|
| + is: 'history-toolbar',
|
| + properties: {
|
| + // Number of history items currently selected.
|
| + count: {
|
| + type: Number,
|
| + value: 0,
|
| + observer: 'changeToolbarView_'
|
| + },
|
| + // True if 1 or more history items are selected. When this value changes
|
| + // the background colour changes.
|
| + itemsSelected_: {
|
| + type: Boolean,
|
| + value: false,
|
| + reflectToAttribute: true
|
| + }
|
| + },
|
| +
|
| + /**
|
| + * Changes the toolbar background color depending on whether any history items
|
| + * are currently selected.
|
| + * @private
|
| + */
|
| + changeToolbarView_: function() {
|
| + this.itemsSelected_ = this.count != 0;
|
| + },
|
| +
|
| + onClearSelectionTap_: function() {
|
| + this.fire('unselect-all');
|
| + }
|
| +});
|
|
|