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

Unified Diff: ext/background.js

Issue 5646124035604480: Issue 154 - Added UI for devtools panel on Chrome (Closed)
Patch Set: Added new request types Created Jan. 28, 2016, 7:37 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 | « devtools-panel.js ('k') | ext/content.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/background.js
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -84,4 +84,17 @@
if (callback)
callback();
};
+
+ global.ext.devtools = {
+ onCreated: {
+ addListener: function(listener)
+ {
+ window.addEventListener("message", function(event)
+ {
+ if (event.data.type == "devtools")
+ listener(new ext.Page(event.source));
+ });
+ }
+ }
+ };
})(this);
« no previous file with comments | « devtools-panel.js ('k') | ext/content.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld