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

Unified Diff: chrome/browser/resources/md_history/history_item.js

Issue 2097003002: MD History: Remove bookmark when clicking bookmark star (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add event listener to remove all bookmark stars Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_history/history_item.js
diff --git a/chrome/browser/resources/md_history/history_item.js b/chrome/browser/resources/md_history/history_item.js
index 78aa976b52b71fca43e68ef52f297bfdc70e63e1..7c23c0ef1c3d3444fe4e4e1d1f2188de6b6202d2 100644
--- a/chrome/browser/resources/md_history/history_item.js
+++ b/chrome/browser/resources/md_history/history_item.js
@@ -42,6 +42,15 @@ cr.define('md_history', function() {
},
/**
+ * Remove bookmark of current item when bookmark-star is clicked.
+ * @private
+ */
+ onRemoveBookmarkTap_: function() {
+ chrome.send('removeBookmark', [this.item.url]);
calamity 2016/06/29 07:36:05 Consider moving this into a method in browser_serv
tsergeant 2016/06/30 01:41:10 Sure, sgtm.
lshang 2016/07/01 01:15:16 Done.
+ this.fire('remove-bookmark-stars', this.item.url);
+ },
+
+ /**
* Fires a custom event when the menu button is clicked. Sends the details
* of the history item and where the menu should appear.
*/

Powered by Google App Engine
This is Rietveld 408576698