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

Side by Side Diff: webkit/glue/devtools/js/inject_dispatch.js

Issue 150219: DevTools: Move InspectorController message filtering to the injected side. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Injects 'injected' object into the inspectable page. 6 * @fileoverview Injects 'injected' object into the inspectable page.
7 */ 7 */
8 8
9 /** 9 /**
10 * Dispatches host calls into the injected function calls. 10 * Dispatches host calls into the injected function calls.
(...skipping 29 matching lines...) Expand all
40 // Handle all messages with non-primitieve arguments here. 40 // Handle all messages with non-primitieve arguments here.
41 var args = Array.prototype.slice.call(arguments); 41 var args = Array.prototype.slice.call(arguments);
42 42
43 // Serialize objects here. 43 // Serialize objects here.
44 if (method == 'addMessageToConsole') { 44 if (method == 'addMessageToConsole') {
45 // Skip first argument since it is serializable. 45 // Skip first argument since it is serializable.
46 // Method has index 0, first argument has index 1. Skip both. 46 // Method has index 0, first argument has index 1. Skip both.
47 for (var i = 2; i < args.length; ++i) { 47 for (var i = 2; i < args.length; ++i) {
48 args[i] = devtools$$obj.wrapConsoleObject(args[i]); 48 args[i] = devtools$$obj.wrapConsoleObject(args[i]);
49 } 49 }
50 } else if (method == 'inspectedWindowCleared' ||
51 method == 'reset' ||
52 method == 'setAttachedWindow') {
53 // Filter out messages we don't need here.
54 // We do it on the sender side since they may have non-serializable
55 // parameters.
56 return;
50 } 57 }
51 var call = JSON.stringify(args); 58 var call = JSON.stringify(args);
52 DevToolsAgentHost.dispatch(call); 59 DevToolsAgentHost.dispatch(call);
53 }; 60 };
OLDNEW
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698