summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-07 12:47:13 +0000
committeryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-07 12:47:13 +0000
commitd4d415edb34c9159422d57653f8c79eb87ce771c (patch)
treea724f5424d109e2b6e548110ba0a0b617fc482b9 /chrome
parent161c5ccadb26629f9f8b526f5a6f607e56b2fbde (diff)
downloadchromium_src-d4d415edb34c9159422d57653f8c79eb87ce771c.zip
chromium_src-d4d415edb34c9159422d57653f8c79eb87ce771c.tar.gz
chromium_src-d4d415edb34c9159422d57653f8c79eb87ce771c.tar.bz2
Add implementation for WebDevToolsAgentClient::debuggerScriptSource.
To be able to stop on top-level breakpoints We need to enable javascript debugger before any scripts are executed. That's why DebuggerScript.js contents should be retrieved synchronously. Review URL: http://codereview.chromium.org/2609001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49045 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/renderer/devtools_agent.cc10
-rw-r--r--chrome/renderer/devtools_agent.h1
2 files changed, 9 insertions, 2 deletions
diff --git a/chrome/renderer/devtools_agent.cc b/chrome/renderer/devtools_agent.cc
index a7f02de..a1e2e8e 100644
--- a/chrome/renderer/devtools_agent.cc
+++ b/chrome/renderer/devtools_agent.cc
@@ -30,7 +30,7 @@ namespace {
class WebKitClientMessageLoopImpl
: public WebDevToolsAgentClient::WebKitClientMessageLoop {
-public:
+ public:
WebKitClientMessageLoopImpl() : message_loop_(MessageLoop::current()) { }
virtual ~WebKitClientMessageLoopImpl() {
message_loop_ = NULL;
@@ -44,7 +44,7 @@ public:
virtual void quitNow() {
message_loop_->QuitNow();
}
-private:
+ private:
MessageLoop* message_loop_;
};
@@ -124,6 +124,12 @@ WebCString DevToolsAgent::injectedScriptDispatcherSource() {
return WebCString(injectDispatchjs.as_string().c_str());
}
+WebCString DevToolsAgent::debuggerScriptSource() {
+ base::StringPiece debuggerScriptjs =
+ webkit_glue::GetDataResource(IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS);
+ return WebCString(debuggerScriptjs.as_string().c_str());
+}
+
WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop*
DevToolsAgent::createClientMessageLoop() {
return new WebKitClientMessageLoopImpl();
diff --git a/chrome/renderer/devtools_agent.h b/chrome/renderer/devtools_agent.h
index 8ae9099..23fa10c 100644
--- a/chrome/renderer/devtools_agent.h
+++ b/chrome/renderer/devtools_agent.h
@@ -47,6 +47,7 @@ class DevToolsAgent : public WebKit::WebDevToolsAgentClient {
bool enabled);
virtual WebKit::WebCString injectedScriptSource();
virtual WebKit::WebCString injectedScriptDispatcherSource();
+ virtual WebKit::WebCString debuggerScriptSource();
virtual WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop*
createClientMessageLoop();
virtual bool exposeV8DebuggerProtocol();