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

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

Issue 2165473002: MD History: Close the item overflow menu when search results change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_slash_command
Patch Set: Close unconditionally 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
« no previous file with comments | « no previous file | chrome/test/data/webui/md_history/history_overflow_menu_test.js » ('j') | 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 19 matching lines...) Expand all
30 'toggle-menu': 'toggleMenu_', 30 'toggle-menu': 'toggleMenu_',
31 }, 31 },
32 32
33 /** 33 /**
34 * @param {HistoryQuery} info An object containing information about the 34 * @param {HistoryQuery} info An object containing information about the
35 * query. 35 * query.
36 * @param {!Array<HistoryEntry>} results A list of results. 36 * @param {!Array<HistoryEntry>} results A list of results.
37 */ 37 */
38 historyResult: function(info, results) { 38 historyResult: function(info, results) {
39 this.initializeResults_(info, results); 39 this.initializeResults_(info, results);
40 this.closeMenu_();
40 41
41 if (this.selectedPage_ == 'grouped-list') { 42 if (this.selectedPage_ == 'grouped-list') {
42 this.$$('#grouped-list').historyData = results; 43 this.$$('#grouped-list').historyData = results;
43 return; 44 return;
44 } 45 }
45 46
46 var list = /** @type {HistoryListElement} */(this.$['infinite-list']); 47 var list = /** @type {HistoryListElement} */(this.$['infinite-list']);
47 list.addNewResults(results); 48 list.addNewResults(results);
48 if (info.finished) 49 if (info.finished)
49 list.disableResultLoading(); 50 list.disableResultLoading();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 .then(function(items) { 184 .then(function(items) {
184 this.$['infinite-list'].removeDeletedHistory_(items); 185 this.$['infinite-list'].removeDeletedHistory_(items);
185 // This unselect-all is to reset the toolbar when deleting a selected 186 // This unselect-all is to reset the toolbar when deleting a selected
186 // item. TODO(tsergeant): Make this automatic based on observing list 187 // item. TODO(tsergeant): Make this automatic based on observing list
187 // modifications. 188 // modifications.
188 this.fire('unselect-all'); 189 this.fire('unselect-all');
189 }.bind(this)); 190 }.bind(this));
190 menu.closeMenu(); 191 menu.closeMenu();
191 }, 192 },
192 }); 193 });
OLDNEW
« no previous file with comments | « no previous file | 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