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

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

Issue 2104013004: MD WebUI: Reimplement cr-shared-menu using iron-dropdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reword comment 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-list', 6 is: 'history-list',
7 7
8 properties: { 8 properties: {
9 // The search term for the current query. Set when the query returns. 9 // The search term for the current query. Set when the query returns.
10 searchedTerm: { 10 searchedTerm: {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 for (var i = 0; i < this.historyData_.length; i++) { 66 for (var i = 0; i < this.historyData_.length; i++) {
67 if (this.historyData_[i].url == url) 67 if (this.historyData_[i].url == url)
68 this.set('historyData_.' + i + '.starred', false); 68 this.set('historyData_.' + i + '.starred', false);
69 } 69 }
70 }, 70 },
71 71
72 /** @private */ 72 /** @private */
73 onMoreFromSiteTap_: function() { 73 onMoreFromSiteTap_: function() {
74 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); 74 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu);
75 this.fire('search-domain', {domain: menu.itemData.domain}); 75 this.fire('search-domain', {domain: menu.itemData.domain});
76 menu.closeMenu(); 76 menu.closeMenuNoRefocus();
77 }, 77 },
78 78
79 /** @private */ 79 /** @private */
80 onRemoveFromHistoryTap_: function() { 80 onRemoveFromHistoryTap_: function() {
81 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); 81 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu);
82 md_history.BrowserService.getInstance() 82 md_history.BrowserService.getInstance()
83 .deleteItems([menu.itemData]) 83 .deleteItems([menu.itemData])
84 .then(function(items) { 84 .then(function(items) {
85 this.removeDeletedHistory_(items); 85 this.removeDeletedHistory_(items);
86 // This unselect-all is to reset the toolbar when deleting a selected 86 // This unselect-all is to reset the toolbar when deleting a selected
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 /** 266 /**
267 * @param {number} index 267 * @param {number} index
268 * @return {boolean} 268 * @return {boolean}
269 * @private 269 * @private
270 */ 270 */
271 isFirstItem_: function(index) { 271 isFirstItem_: function(index) {
272 return index == 0; 272 return index == 0;
273 } 273 }
274 }); 274 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698