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

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

Issue 2558703003: MD History: Fix loading of history results in background tabs (Closed)
Patch Set: Closure Created 4 years 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/app.vulcanized.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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 historyDeleted: function() { 95 historyDeleted: function() {
96 // Do not reload the list when there are items checked. 96 // Do not reload the list when there are items checked.
97 if (this.getSelectedItemCount() > 0) 97 if (this.getSelectedItemCount() > 0)
98 return; 98 return;
99 99
100 // Reload the list with current search state. 100 // Reload the list with current search state.
101 this.queryHistory(false); 101 this.queryHistory(false);
102 }, 102 },
103 103
104 /** @return {HTMLElement} */ 104 /** @return {Element} */
105 getContentScrollTarget: function() { 105 getContentScrollTarget: function() {
106 return this.getSelectedList_(); 106 return this.getSelectedList_();
107 }, 107 },
108 108
109 /** @return {number} */ 109 /** @return {number} */
110 getSelectedItemCount: function() { 110 getSelectedItemCount: function() {
111 return this.getSelectedList_().selectedPaths.size; 111 return this.getSelectedList_().selectedPaths.size;
112 }, 112 },
113 113
114 unselectAllItems: function(count) { 114 unselectAllItems: function(count) {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 if (index <= UMA_MAX_SUBSET_BUCKET_VALUE) { 276 if (index <= UMA_MAX_SUBSET_BUCKET_VALUE) {
277 browserService.recordHistogram( 277 browserService.recordHistogram(
278 'HistoryPage.RemoveEntryPositionSubset', index, 278 'HistoryPage.RemoveEntryPositionSubset', index,
279 UMA_MAX_SUBSET_BUCKET_VALUE); 279 UMA_MAX_SUBSET_BUCKET_VALUE);
280 } 280 }
281 }.bind(this)); 281 }.bind(this));
282 menu.closeMenu(); 282 menu.closeMenu();
283 }, 283 },
284 284
285 /** 285 /**
286 * @return {HTMLElement} 286 * @return {Element}
287 * @private 287 * @private
288 */ 288 */
289 getSelectedList_: function() { return this.$.content.selectedItem; }, 289 getSelectedList_: function() { return this.$$('#' + this.selectedPage_); },
290 290
291 /** @private */ 291 /** @private */
292 canDeleteHistory_: function() { 292 canDeleteHistory_: function() {
293 return loadTimeData.getBoolean('allowDeletingHistory'); 293 return loadTimeData.getBoolean('allowDeletingHistory');
294 } 294 }
295 }); 295 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/app.vulcanized.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698