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

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

Issue 2583353003: MD History: Replace last usage of cr-shared-menu with cr-action-menu. (Closed)
Patch Set: Fix more 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
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 /** 5 /**
6 * @param {!Element} root 6 * @param {!Element} root
7 * @param {?Element} boundary 7 * @param {?Element} boundary
8 * @param {cr.ui.FocusRow.Delegate} delegate 8 * @param {cr.ui.FocusRow.Delegate} delegate
9 * @constructor 9 * @constructor
10 * @extends {cr.ui.FocusRow} 10 * @extends {cr.ui.FocusRow}
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 browserService.recordAction('BookmarkStarClicked'); 239 browserService.recordAction('BookmarkStarClicked');
240 240
241 this.fire('remove-bookmark-stars', this.item.url); 241 this.fire('remove-bookmark-stars', this.item.url);
242 }, 242 },
243 243
244 /** 244 /**
245 * Fires a custom event when the menu button is clicked. Sends the details 245 * Fires a custom event when the menu button is clicked. Sends the details
246 * of the history item and where the menu should appear. 246 * of the history item and where the menu should appear.
247 */ 247 */
248 onMenuButtonTap_: function(e) { 248 onMenuButtonTap_: function(e) {
249 this.fire('toggle-menu', { 249 this.fire('open-menu', {
250 target: Polymer.dom(e).localTarget, 250 target: Polymer.dom(e).localTarget,
251 index: this.index, 251 index: this.index,
252 item: this.item, 252 item: this.item,
253 path: this.path, 253 path: this.path,
254 }); 254 });
255 255
256 // Stops the 'tap' event from closing the menu when it opens. 256 // Stops the 'tap' event from closing the menu when it opens.
257 e.stopPropagation(); 257 e.stopPropagation();
258 }, 258 },
259 259
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 * @return {string} The title for a page of search results. 348 * @return {string} The title for a page of search results.
349 */ 349 */
350 HistoryItem.searchResultsTitle = function(numberOfResults, searchTerm) { 350 HistoryItem.searchResultsTitle = function(numberOfResults, searchTerm) {
351 var resultId = numberOfResults == 1 ? 'searchResult' : 'searchResults'; 351 var resultId = numberOfResults == 1 ? 'searchResult' : 'searchResults';
352 return loadTimeData.getStringF('foundSearchResults', numberOfResults, 352 return loadTimeData.getStringF('foundSearchResults', numberOfResults,
353 loadTimeData.getString(resultId), searchTerm); 353 loadTimeData.getString(resultId), searchTerm);
354 }; 354 };
355 355
356 return { HistoryItem: HistoryItem }; 356 return { HistoryItem: HistoryItem };
357 }); 357 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698