OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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: 'cr-toolbar', | 6 is: 'cr-toolbar', |
7 | 7 |
8 properties: { | 8 properties: { |
9 // Name to display in the toolbar, in titlecase. | 9 // Name to display in the toolbar, in titlecase. |
10 pageName: String, | 10 pageName: String, |
11 | 11 |
12 // Prompt text to display in the search field. | 12 // Prompt text to display in the search field. |
13 searchPrompt: String, | 13 searchPrompt: String, |
14 | 14 |
15 // Tooltip to display on the clear search button. | 15 // Tooltip to display on the clear search button. |
16 clearLabel: String, | 16 clearLabel: String, |
17 | 17 |
18 // Value is proxied through to cr-toolbar-search-field. When true, | 18 // Value is proxied through to cr-toolbar-search-field. When true, |
19 // the search field will show a processing spinner. | 19 // the search field will show a processing spinner. |
20 spinnerActive: Boolean, | 20 spinnerActive: Boolean, |
21 | 21 |
| 22 // Controls whether the menu button is shown at the start of the menu. |
| 23 showMenu: { |
| 24 type: Boolean, |
| 25 reflectToAttribute: true, |
| 26 value: true |
| 27 }, |
| 28 |
22 /** @private */ | 29 /** @private */ |
23 narrow_: { | 30 narrow_: { |
24 type: Boolean, | 31 type: Boolean, |
25 reflectToAttribute: true | 32 reflectToAttribute: true |
26 }, | 33 }, |
27 | 34 |
28 /** @private */ | 35 /** @private */ |
29 showingSearch_: { | 36 showingSearch_: { |
30 type: Boolean, | 37 type: Boolean, |
31 reflectToAttribute: true, | 38 reflectToAttribute: true, |
32 }, | 39 }, |
33 }, | 40 }, |
34 | 41 |
35 /** @return {!CrToolbarSearchFieldElement} */ | 42 /** @return {!CrToolbarSearchFieldElement} */ |
36 getSearchField: function() { | 43 getSearchField: function() { |
37 return this.$.search; | 44 return this.$.search; |
38 }, | 45 }, |
39 | 46 |
40 /** @private */ | 47 /** @private */ |
41 onMenuTap_: function(e) { | 48 onMenuTap_: function(e) { |
42 this.fire('cr-menu-tap'); | 49 this.fire('cr-menu-tap'); |
43 } | 50 } |
44 }); | 51 }); |
OLD | NEW |