summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/renderer/devtools_agent.cc7
-rw-r--r--chrome/renderer/devtools_agent.h2
-rw-r--r--chrome/renderer/render_view.cc3
-rw-r--r--webkit/glue/devtools/debugger_agent_manager.cc7
-rw-r--r--webkit/glue/devtools/debugger_agent_manager.h2
-rw-r--r--webkit/glue/webdevtoolsagent.h2
-rw-r--r--webkit/glue/webdevtoolsagent_impl.cc4
-rw-r--r--webkit/glue/webdevtoolsagent_impl.h1
8 files changed, 28 insertions, 0 deletions
diff --git a/chrome/renderer/devtools_agent.cc b/chrome/renderer/devtools_agent.cc
index 00bb750..aef7125 100644
--- a/chrome/renderer/devtools_agent.cc
+++ b/chrome/renderer/devtools_agent.cc
@@ -22,6 +22,13 @@ DevToolsAgent::~DevToolsAgent() {
agent_for_routing_id_.erase(routing_id_);
}
+void DevToolsAgent::OnNavigate() {
+ WebDevToolsAgent* web_agent = GetWebAgent();
+ if (web_agent) {
+ web_agent->OnNavigate();
+ }
+}
+
// Called on the Renderer thread.
bool DevToolsAgent::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
diff --git a/chrome/renderer/devtools_agent.h b/chrome/renderer/devtools_agent.h
index f7e59d9e..985d677 100644
--- a/chrome/renderer/devtools_agent.h
+++ b/chrome/renderer/devtools_agent.h
@@ -26,6 +26,8 @@ class DevToolsAgent : public WebDevToolsAgentDelegate {
DevToolsAgent(int routing_id, RenderView* view);
virtual ~DevToolsAgent();
+ void OnNavigate();
+
// IPC message interceptor. Called on the Render thread.
virtual bool OnMessageReceived(const IPC::Message& message);
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 7bd7c28..abe0cde 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -635,6 +635,9 @@ void RenderView::OnNavigate(const ViewMsg_Navigate_Params& params) {
if (!webview())
return;
+ if (devtools_agent_.get())
+ devtools_agent_->OnNavigate();
+
child_process_logging::ScopedActiveURLSetter url_setter(params.url);
AboutHandler::MaybeHandle(params.url);
diff --git a/webkit/glue/devtools/debugger_agent_manager.cc b/webkit/glue/devtools/debugger_agent_manager.cc
index 791831c..12dd202 100644
--- a/webkit/glue/devtools/debugger_agent_manager.cc
+++ b/webkit/glue/devtools/debugger_agent_manager.cc
@@ -250,6 +250,13 @@ void DebuggerAgentManager::OnWebViewClosed(WebViewImpl* webview) {
}
// static
+void DebuggerAgentManager::OnNavigate() {
+ if (in_host_dispatch_handler_) {
+ DebuggerAgentManager::SendContinueCommandToV8();
+ }
+}
+
+// static
void DebuggerAgentManager::SendCommandToV8(const string16& cmd,
v8::Debug::ClientData* data) {
#if USE(V8)
diff --git a/webkit/glue/devtools/debugger_agent_manager.h b/webkit/glue/devtools/debugger_agent_manager.h
index e0cae0a..eb8b225 100644
--- a/webkit/glue/devtools/debugger_agent_manager.h
+++ b/webkit/glue/devtools/debugger_agent_manager.h
@@ -50,6 +50,8 @@ class DebuggerAgentManager {
static void OnWebViewClosed(WebViewImpl* webview);
+ static void OnNavigate();
+
private:
DebuggerAgentManager();
~DebuggerAgentManager();
diff --git a/webkit/glue/webdevtoolsagent.h b/webkit/glue/webdevtoolsagent.h
index 177ec2f..e5c060d 100644
--- a/webkit/glue/webdevtoolsagent.h
+++ b/webkit/glue/webdevtoolsagent.h
@@ -28,6 +28,8 @@ class WebDevToolsAgent {
virtual void Detach() = 0;
+ virtual void OnNavigate() = 0;
+
virtual void DispatchMessageFromClient(const std::string& class_name,
const std::string& method_name,
const std::string& raw_msg) = 0;
diff --git a/webkit/glue/webdevtoolsagent_impl.cc b/webkit/glue/webdevtoolsagent_impl.cc
index b84884b..5ff16ed 100644
--- a/webkit/glue/webdevtoolsagent_impl.cc
+++ b/webkit/glue/webdevtoolsagent_impl.cc
@@ -123,6 +123,10 @@ void WebDevToolsAgentImpl::Detach() {
attached_ = false;
}
+void WebDevToolsAgentImpl::OnNavigate() {
+ DebuggerAgentManager::OnNavigate();
+}
+
void WebDevToolsAgentImpl::SetMainFrameDocumentReady(bool ready) {
if (!attached_) {
return;
diff --git a/webkit/glue/webdevtoolsagent_impl.h b/webkit/glue/webdevtoolsagent_impl.h
index 64fd205..599bc0f 100644
--- a/webkit/glue/webdevtoolsagent_impl.h
+++ b/webkit/glue/webdevtoolsagent_impl.h
@@ -57,6 +57,7 @@ class WebDevToolsAgentImpl
// WebDevToolsAgent implementation.
virtual void Attach();
virtual void Detach();
+ virtual void OnNavigate();
virtual void DispatchMessageFromClient(const std::string& class_name,
const std::string& method_name,
const std::string& raw_msg);