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

Unified Diff: chrome/browser/resources/md_bookmarks/command_manager.js

Issue 2926233002: MD Bookmarks: Add right-click context menu to sidebar folders (Closed)
Patch Set: Don't reselect folder Created 3 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
« no previous file with comments | « no previous file | chrome/browser/resources/md_bookmarks/folder_node.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_bookmarks/command_manager.js
diff --git a/chrome/browser/resources/md_bookmarks/command_manager.js b/chrome/browser/resources/md_bookmarks/command_manager.js
index 24c26d51c673ca4bed26f2de7693e02bdd4bce12..c7fae82bb3a65bd018386e24a79ccce3abd09d47 100644
--- a/chrome/browser/resources/md_bookmarks/command_manager.js
+++ b/chrome/browser/resources/md_bookmarks/command_manager.js
@@ -86,12 +86,14 @@ cr.define('bookmarks', function() {
/**
* Display the command context menu at (|x|, |y|) in window co-ordinates.
- * Commands will execute on the currently selected items.
+ * Commands will execute on |items| if given, or on the currently selected
+ * items.
* @param {number} x
* @param {number} y
+ * @param {Set<string>=} items
*/
- openCommandMenuAtPosition: function(x, y) {
- this.menuIds_ = this.getState().selection.items;
+ openCommandMenuAtPosition: function(x, y, items) {
+ this.menuIds_ = items || this.getState().selection.items;
/** @type {!CrActionMenuElement} */ (this.$.dropdown)
.showAtPosition({top: y, left: x});
},
« no previous file with comments | « no previous file | chrome/browser/resources/md_bookmarks/folder_node.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698