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

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

Issue 2118383003: MD History: add shortcuts for search (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test change 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 }, 89 },
90 90
91 onClearSelectionTap_: function() { 91 onClearSelectionTap_: function() {
92 this.fire('unselect-all'); 92 this.fire('unselect-all');
93 }, 93 },
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() {
100 /** @type {!CrToolbarElement} */(this.$['main-toolbar'])
101 .getSearchField()
102 .showAndFocus();
103 },
104
99 /** 105 /**
100 * If the user is a supervised user the delete button is not shown. 106 * If the user is a supervised user the delete button is not shown.
101 * @private 107 * @private
102 */ 108 */
103 deletingAllowed_: function() { 109 deletingAllowed_: function() {
104 return loadTimeData.getBoolean('allowDeletingHistory'); 110 return loadTimeData.getBoolean('allowDeletingHistory');
105 }, 111 },
106 112
107 numberOfItemsSelected_: function(count) { 113 numberOfItemsSelected_: function(count) {
108 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; 114 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : '';
109 }, 115 },
110 116
111 getHistoryInterval_: function(queryStartTime, queryEndTime) { 117 getHistoryInterval_: function(queryStartTime, queryEndTime) {
112 // TODO(calamity): Fix the format of these dates. 118 // TODO(calamity): Fix the format of these dates.
113 return loadTimeData.getStringF( 119 return loadTimeData.getStringF(
114 'historyInterval', queryStartTime, queryEndTime); 120 'historyInterval', queryStartTime, queryEndTime);
115 } 121 }
116 }); 122 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/history.html ('k') | chrome/test/data/webui/md_history/history_overflow_menu_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698