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

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

Issue 2237703004: [MD History] Focus the search bar on load. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 4 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 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: 'history-list-container', 6 is: 'history-list-container',
7 7
8 properties: { 8 properties: {
9 // The path of the currently selected page. 9 // The path of the currently selected page.
10 selectedPage_: String, 10 selectedPage_: String,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 lastVisitTime, maxResults 86 lastVisitTime, maxResults
87 ]); 87 ]);
88 }, 88 },
89 89
90 /** @return {number} */ 90 /** @return {number} */
91 getSelectedItemCount: function() { 91 getSelectedItemCount: function() {
92 return this.getSelectedList_().selectedPaths.size; 92 return this.getSelectedList_().selectedPaths.size;
93 }, 93 },
94 94
95 unselectAllItems: function(count) { 95 unselectAllItems: function(count) {
96 this.getSelectedList_().unselectAllItems(count); 96 if (this.getSelectedList_())
tsergeant 2016/08/19 00:21:38 you'll need to do a good old-fashioned rebase for
calamity 2016/08/19 03:50:57 Done.
97 this.getSelectedList_().unselectAllItems(count);
97 }, 98 },
98 99
99 /** 100 /**
100 * Delete all the currently selected history items. Will prompt the user with 101 * Delete all the currently selected history items. Will prompt the user with
101 * a dialog to confirm that the deletion should be performed. 102 * a dialog to confirm that the deletion should be performed.
102 */ 103 */
103 deleteSelectedWithPrompt: function() { 104 deleteSelectedWithPrompt: function() {
104 if (!loadTimeData.getBoolean('allowDeletingHistory')) 105 if (!loadTimeData.getBoolean('allowDeletingHistory'))
105 return; 106 return;
106 this.$.dialog.get().then(function(dialog) { 107 this.$.dialog.get().then(function(dialog) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 }, 208 },
208 209
209 /** 210 /**
210 * @return {HTMLElement} 211 * @return {HTMLElement}
211 * @private 212 * @private
212 */ 213 */
213 getSelectedList_: function() { 214 getSelectedList_: function() {
214 return this.$.content.selectedItem; 215 return this.$.content.selectedItem;
215 }, 216 },
216 }); 217 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698