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

Unified Diff: chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js

Issue 8993007: WebUI TaskManager: Delay scripts loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: marge with master Created 8 years, 11 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 | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/task_manager/includes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
diff --git a/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js b/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
index c413229adbbc7a278967f59c01c71e40c4ba1a4f..f68cd0ae090c31b88135658bf8a0c4d903069f97 100644
--- a/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
+++ b/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
@@ -211,6 +211,18 @@ cr.define('cr.ui', function() {
return this.getBoundingClientRect();
};
}
+ },
+
+ /**
+ * Sets the given contextMenu to the given element. A contextMenu property
+ * would be added if necessary.
+ * @param {!Element} element The element or class to set the contextMenu to.
+ * @param {!cr.ui.Menu} contextMenu The contextMenu property to be set.
+ */
+ setContextMenu: function(element, contextMenu) {
+ if (!element.contextMenu)
+ this.addContextMenuProperty(element);
+ element.contextMenu = contextMenu;
}
};
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/task_manager/includes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698