Chromium Code Reviews| Index: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.js |
| diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.js b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f9f75472ac6e30dcae11817eccf0cee49bc3d8e3 |
| --- /dev/null |
| +++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.js |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2017 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. |
| + |
| +/** |
| + * @fileoverview Element which displays the number of selected items with |
| + * Cancel/Delete buttons, designed to be used as an overlay on top of |
| + * <cr-toolbar>. See <history-toolbar> for an example usage. |
| + */ |
| + |
| +Polymer({ |
| + is: 'cr-toolbar-selection-overlay', |
| + |
| + properties: { |
| + deleteLabel: String, |
| + |
| + cancelLabel: String, |
| + |
| + selectionLabel: String, |
| + }, |
| + |
| + /** @private */ |
| + onClearSelectionTap_: function() { |
| + this.fire('clear-selected-items'); |
| + }, |
| + |
| + /** @private */ |
| + onDeleteTap_: function() { |
|
Dan Beam
2017/04/11 00:39:01
nit: just name this deleteSelectedItems() and make
tsergeant
2017/04/11 01:16:20
Done, although the method being called from tests
|
| + this.fire('delete-selected-items'); |
| + }, |
| +}); |