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

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

Issue 2246033002: [MD History] Fix the 'Remove from history' button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shift_select
Patch Set: rebase Created 4 years, 4 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/browser/resources/md_history/list_container.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 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 cr.define('md_history', function() { 5 cr.define('md_history', function() {
6 var HistoryItem = Polymer({ 6 var HistoryItem = Polymer({
7 is: 'history-item', 7 is: 'history-item',
8 8
9 properties: { 9 properties: {
10 // Underlying HistoryEntry data for this item. Contains read-only fields 10 // Underlying HistoryEntry data for this item. Contains read-only fields
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 }, 64 },
65 65
66 /** 66 /**
67 * Fires a custom event when the menu button is clicked. Sends the details 67 * Fires a custom event when the menu button is clicked. Sends the details
68 * of the history item and where the menu should appear. 68 * of the history item and where the menu should appear.
69 */ 69 */
70 onMenuButtonTap_: function(e) { 70 onMenuButtonTap_: function(e) {
71 this.fire('toggle-menu', { 71 this.fire('toggle-menu', {
72 target: Polymer.dom(e).localTarget, 72 target: Polymer.dom(e).localTarget,
73 item: this.item, 73 item: this.item,
74 path: this.path,
74 }); 75 });
75 76
76 // Stops the 'tap' event from closing the menu when it opens. 77 // Stops the 'tap' event from closing the menu when it opens.
77 e.stopPropagation(); 78 e.stopPropagation();
78 }, 79 },
79 80
80 /** 81 /**
81 * Set the favicon image, based on the URL of the history item. 82 * Set the favicon image, based on the URL of the history item.
82 * @private 83 * @private
83 */ 84 */
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 137
137 if (searchedTerm) 138 if (searchedTerm)
138 return currentItem.dateShort != nextItem.dateShort; 139 return currentItem.dateShort != nextItem.dateShort;
139 140
140 return currentItem.time - nextItem.time > BROWSING_GAP_TIME && 141 return currentItem.time - nextItem.time > BROWSING_GAP_TIME &&
141 currentItem.dateRelativeDay == nextItem.dateRelativeDay; 142 currentItem.dateRelativeDay == nextItem.dateRelativeDay;
142 }; 143 };
143 144
144 return { HistoryItem: HistoryItem }; 145 return { HistoryItem: HistoryItem };
145 }); 146 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/md_history/list_container.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698