summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/devtools_agent.cc
diff options
context:
space:
mode:
authoryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-31 09:17:33 +0000
committeryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-31 09:17:33 +0000
commit993f61df3dfb75bc18074cb7b0677fcf1367fa09 (patch)
tree42002e78558dc49b3061370b9bf29b629b344135 /chrome/renderer/devtools_agent.cc
parent14bd3b14f60343740a21e2ce5ae1f35644f7f4ac (diff)
downloadchromium_src-993f61df3dfb75bc18074cb7b0677fcf1367fa09.zip
chromium_src-993f61df3dfb75bc18074cb7b0677fcf1367fa09.tar.gz
chromium_src-993f61df3dfb75bc18074cb7b0677fcf1367fa09.tar.bz2
DevTools: load injected script using WebKit API. Now with test_shell working.
BUG=28062 Review URL: http://codereview.chromium.org/552252 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37661 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/devtools_agent.cc')
-rw-r--r--chrome/renderer/devtools_agent.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/renderer/devtools_agent.cc b/chrome/renderer/devtools_agent.cc
index 5d5373a..57c2f20 100644
--- a/chrome/renderer/devtools_agent.cc
+++ b/chrome/renderer/devtools_agent.cc
@@ -8,15 +8,18 @@
#include "chrome/common/render_messages.h"
#include "chrome/renderer/devtools_agent_filter.h"
#include "chrome/renderer/render_view.h"
+#include "grit/webkit_resources.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsMessageData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "webkit/glue/devtools/devtools_message_data.h"
+#include "webkit/glue/webkit_glue.h"
using WebKit::WebDevToolsAgent;
using WebKit::WebPoint;
using WebKit::WebString;
+using WebKit::WebCString;
using WebKit::WebVector;
using WebKit::WebView;
@@ -79,6 +82,18 @@ void DevToolsAgent::runtimeFeatureStateChanged(const WebKit::WebString& feature,
enabled));
}
+WebCString DevToolsAgent::injectedScriptSource() {
+ base::StringPiece injectjsWebkit =
+ webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_WEBKIT_JS);
+ return WebCString(injectjsWebkit.as_string().c_str());
+}
+
+WebCString DevToolsAgent::injectedScriptDispatcherSource() {
+ base::StringPiece injectDispatchjs =
+ webkit_glue::GetDataResource(IDR_DEVTOOLS_INJECT_DISPATCH_JS);
+ return WebCString(injectDispatchjs.as_string().c_str());
+}
+
// static
DevToolsAgent* DevToolsAgent::FromHostId(int host_id) {
std::map<int, DevToolsAgent*>::iterator it =