Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: chrome/browser/resources/md_history/history_toolbar.js

Issue 2450663003: MD History: hide tooltip promo when drawer is swiped open (Closed)
Patch Set: on-lonely="fixUpCode_" Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // TODO(calamity): bind this to 9 // TODO(calamity): bind this to
10 // listContainer.selectedItem.selectedPaths.length. 10 // listContainer.selectedItem.selectedPaths.length.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 }, 60 },
61 61
62 // The start time of the query range. 62 // The start time of the query range.
63 queryStartTime: String, 63 queryStartTime: String,
64 64
65 // The end time of the query range. 65 // The end time of the query range.
66 queryEndTime: String, 66 queryEndTime: String,
67 67
68 // Whether to show the menu promo (a tooltip that points at the menu button 68 // Whether to show the menu promo (a tooltip that points at the menu button
69 // in narrow mode). 69 // in narrow mode).
70 showMenuPromo_: { 70 showMenuPromo: Boolean,
71 type: Boolean,
72 value: function() {
73 return loadTimeData.getBoolean('showMenuPromo');
74 },
75 },
76 }, 71 },
77 72
78 /** @return {CrToolbarSearchFieldElement} */ 73 /** @return {CrToolbarSearchFieldElement} */
79 get searchField() { 74 get searchField() {
80 return /** @type {CrToolbarElement} */ (this.$['main-toolbar']) 75 return /** @type {CrToolbarElement} */ (this.$['main-toolbar'])
81 .getSearchField(); 76 .getSearchField();
82 }, 77 },
83 78
84 showSearchField: function() { 79 showSearchField: function() {
85 this.searchField.showAndFocus(); 80 this.searchField.showAndFocus();
(...skipping 12 matching lines...) Expand all
98 * When changing the search term externally, update the search field to 93 * When changing the search term externally, update the search field to
99 * reflect the new search term. 94 * reflect the new search term.
100 */ 95 */
101 searchTermChanged_: function() { 96 searchTermChanged_: function() {
102 if (this.searchField.getValue() != this.searchTerm) { 97 if (this.searchField.getValue() != this.searchTerm) {
103 this.searchField.showAndFocus(); 98 this.searchField.showAndFocus();
104 this.searchField.setValue(this.searchTerm); 99 this.searchField.setValue(this.searchTerm);
105 } 100 }
106 }, 101 },
107 102
108 /** @private */
109 onMenuPromoShown_: function() {
110 md_history.BrowserService.getInstance().menuPromoShown();
111 },
112
113 /** 103 /**
114 * @param {!CustomEvent} event 104 * @param {!CustomEvent} event
115 * @private 105 * @private
116 */ 106 */
117 onSearchChanged_: function(event) { 107 onSearchChanged_: function(event) {
118 this.searchTerm = /** @type {string} */ (event.detail); 108 this.searchTerm = /** @type {string} */ (event.detail);
119 }, 109 },
120 110
121 /** @private */ 111 /** @private */
122 onInfoButtonTap_: function() { 112 onInfoButtonTap_: function() {
(...skipping 29 matching lines...) Expand all
152 // TODO(calamity): Fix the format of these dates. 142 // TODO(calamity): Fix the format of these dates.
153 return loadTimeData.getStringF( 143 return loadTimeData.getStringF(
154 'historyInterval', queryStartTime, queryEndTime); 144 'historyInterval', queryStartTime, queryEndTime);
155 }, 145 },
156 146
157 /** @private */ 147 /** @private */
158 hasDrawerChanged_: function() { 148 hasDrawerChanged_: function() {
159 this.updateStyles(); 149 this.updateStyles();
160 }, 150 },
161 }); 151 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698