Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/background.js

Issue 5203617959116800: Fixed regression: Context menu clickhide broken (Closed)
Patch Set: Created Dec. 9, 2013, 4:29 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « background.js ('k') | safari/background.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/background.js
===================================================================
--- a/chrome/background.js
+++ b/chrome/background.js
@@ -350,4 +350,22 @@
onBeforeRequest: new BeforeRequestEventTarget(),
handlerBehaviorChanged: chrome.webRequest.handlerBehaviorChanged
};
+
+ ext.contextMenus = {
+ create: function(title, contexts, onclick)
+ {
+ chrome.contextMenus.create({
+ title: title,
+ contexts: contexts,
+ onclick: function(info, tab)
+ {
+ onclick(info.srcUrl, new Tab(tab));
+ }
+ });
+ },
+ removeAll: function(callback)
+ {
+ chrome.contextMenus.removeAll(callback);
+ }
+ };
})();
« no previous file with comments | « background.js ('k') | safari/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld