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

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

Issue 2152753003: MD History: Fix forward slash key not working in search field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 months 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 count: { 9 count: {
10 type: Number, 10 type: Number,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 onDeleteTap_: function() { 95 onDeleteTap_: function() {
96 this.fire('delete-selected'); 96 this.fire('delete-selected');
97 }, 97 },
98 98
99 showSearchField: function() { 99 showSearchField: function() {
100 /** @type {!CrToolbarElement} */(this.$['main-toolbar']) 100 /** @type {!CrToolbarElement} */(this.$['main-toolbar'])
101 .getSearchField() 101 .getSearchField()
102 .showAndFocus(); 102 .showAndFocus();
103 }, 103 },
104 104
Dan Beam 2016/07/15 03:07:41 nit: /** return {boolean} */
lshang 2016/07/15 05:02:09 Since we need to check both the search field is sh
105 showingSearchField: function() {
106 return /** @type {!CrToolbarElement} */(this.$['main-toolbar'])
107 .getSearchField()
108 .showingSearchStatus();
109 },
110
105 /** 111 /**
106 * If the user is a supervised user the delete button is not shown. 112 * If the user is a supervised user the delete button is not shown.
107 * @private 113 * @private
108 */ 114 */
109 deletingAllowed_: function() { 115 deletingAllowed_: function() {
110 return loadTimeData.getBoolean('allowDeletingHistory'); 116 return loadTimeData.getBoolean('allowDeletingHistory');
111 }, 117 },
112 118
113 numberOfItemsSelected_: function(count) { 119 numberOfItemsSelected_: function(count) {
114 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; 120 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : '';
115 }, 121 },
116 122
117 getHistoryInterval_: function(queryStartTime, queryEndTime) { 123 getHistoryInterval_: function(queryStartTime, queryEndTime) {
118 // TODO(calamity): Fix the format of these dates. 124 // TODO(calamity): Fix the format of these dates.
119 return loadTimeData.getStringF( 125 return loadTimeData.getStringF(
120 'historyInterval', queryStartTime, queryEndTime); 126 'historyInterval', queryStartTime, queryEndTime);
121 } 127 }
122 }); 128 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698