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

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

Issue 2503613002: MD History: focus REMOVE button by default in multi-delete dialog (Closed)
Patch Set: revert downloads 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
« no previous file with comments | « chrome/browser/resources/md_history/list_container.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 */ 129 */
130 deleteSelectedWithPrompt: function() { 130 deleteSelectedWithPrompt: function() {
131 if (!loadTimeData.getBoolean('allowDeletingHistory')) 131 if (!loadTimeData.getBoolean('allowDeletingHistory'))
132 return; 132 return;
133 133
134 var browserService = md_history.BrowserService.getInstance(); 134 var browserService = md_history.BrowserService.getInstance();
135 browserService.recordAction('RemoveSelected'); 135 browserService.recordAction('RemoveSelected');
136 if (this.queryState.searchTerm != '') 136 if (this.queryState.searchTerm != '')
137 browserService.recordAction('SearchResultRemove'); 137 browserService.recordAction('SearchResultRemove');
138 this.$.dialog.get().showModal(); 138 this.$.dialog.get().showModal();
139
140 // TODO(dbeam): remove focus flicker caused by showModal() + focus().
141 this.$$('.action-button').focus();
139 }, 142 },
140 143
141 /** 144 /**
142 * @param {HistoryRange} range 145 * @param {HistoryRange} range
143 * @private 146 * @private
144 */ 147 */
145 groupedRangeChanged_: function(range, oldRange) { 148 groupedRangeChanged_: function(range, oldRange) {
146 this.selectedPage_ = range == HistoryRange.ALL_TIME ? 149 this.selectedPage_ = range == HistoryRange.ALL_TIME ?
147 'infinite-list' : 'grouped-list'; 150 'infinite-list' : 'grouped-list';
148 151
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 }.bind(this)); 273 }.bind(this));
271 menu.closeMenu(); 274 menu.closeMenu();
272 }, 275 },
273 276
274 /** 277 /**
275 * @return {HTMLElement} 278 * @return {HTMLElement}
276 * @private 279 * @private
277 */ 280 */
278 getSelectedList_: function() { return this.$.content.selectedItem; }, 281 getSelectedList_: function() { return this.$.content.selectedItem; },
279 }); 282 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/list_container.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698