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

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: Cleanup 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 toggleMenu_: function(e) { 48 toggleMenu_: function(e) {
49 var target = e.detail.target; 49 var target = e.detail.target;
50 /** @type {CrSharedMenuElement} */(this.$.sharedMenu).toggleMenu( 50 /** @type {CrSharedMenuElement} */(this.$.sharedMenu).toggleMenu(
51 target, e.detail.item); 51 target, e.detail.item);
52 }, 52 },
53 53
54 /** @private */ 54 /** @private */
55 onMoreFromSiteTap_: function() { 55 onMoreFromSiteTap_: function() {
56 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); 56 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu);
57 this.fire('search-domain', {domain: menu.itemData.domain}); 57 this.fire('search-domain', {domain: menu.itemData.domain});
58 menu.closeMenu(); 58 menu.closeMenuNoRefocus();
59 }, 59 },
60 60
61 /** @private */ 61 /** @private */
62 onRemoveFromHistoryTap_: function() { 62 onRemoveFromHistoryTap_: function() {
63 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); 63 var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu);
64 md_history.BrowserService.getInstance() 64 md_history.BrowserService.getInstance()
65 .deleteItems([menu.itemData]) 65 .deleteItems([menu.itemData])
66 .then(function(items) { 66 .then(function(items) {
67 this.removeDeletedHistory_(items); 67 this.removeDeletedHistory_(items);
68 // This unselect-all is to reset the toolbar when deleting a selected 68 // This unselect-all is to reset the toolbar when deleting a selected
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 /** 248 /**
249 * @param {number} index 249 * @param {number} index
250 * @return {boolean} 250 * @return {boolean}
251 * @private 251 * @private
252 */ 252 */
253 isFirstItem_: function(index) { 253 isFirstItem_: function(index) {
254 return index == 0; 254 return index == 0;
255 } 255 }
256 }); 256 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698