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

Unified Diff: webkit/glue/devtools/js/inject_dispatch.js

Issue 113836: DevTools: introduce bound object on the agent side. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « webkit/glue/devtools/js/dom_agent.js ('k') | webkit/glue/devtools/js/net_agent.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/js/inject_dispatch.js
===================================================================
--- webkit/glue/devtools/js/inject_dispatch.js (revision 16977)
+++ webkit/glue/devtools/js/inject_dispatch.js (working copy)
@@ -31,3 +31,19 @@
var result = devtools$$obj[functionName].apply(devtools$$obj, params);
return JSON.stringify(result);
};
+
+
+/**
+ * This is called by the InspectorFrontend for serialization.
+ * We serialize the call and send it to the client over the IPC
+ * using dispatchOut bound method.
+ */
+var dispatch = function(method, var_args) {
+ // Handle all messages with non-primitieve arguments here.
+ // TODO(pfeldman): Add more.
+ if (method == 'inspectedWindowCleared') {
+ return;
+ }
+ var call = JSON.stringify(Array.prototype.slice.call(arguments));
+ RemoteWebInspector.dispatch(call);
+};
« no previous file with comments | « webkit/glue/devtools/js/dom_agent.js ('k') | webkit/glue/devtools/js/net_agent.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698