Index: content/shell/browser/shell_devtools_frontend.cc |
diff --git a/content/shell/browser/shell_devtools_frontend.cc b/content/shell/browser/shell_devtools_frontend.cc |
index e64685dcec5186c38d7eb6268a82601012415580..4b1aa1268710f5b3a18d826d938c103b85f99068 100644 |
--- a/content/shell/browser/shell_devtools_frontend.cc |
+++ b/content/shell/browser/shell_devtools_frontend.cc |
@@ -106,29 +106,21 @@ ShellDevToolsFrontend::ShellDevToolsFrontend(Shell* frontend_shell, |
: WebContentsObserver(frontend_shell->web_contents()), |
frontend_shell_(frontend_shell), |
agent_host_(agent_host) { |
- frontend_host_.reset( |
- DevToolsClientHost::CreateDevToolsFrontendHost(web_contents(), this)); |
+ frontend_host_.reset(DevToolsFrontendHost::Create(web_contents(), this)); |
+ DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor( |
+ agent_host_.get(), this); |
} |
ShellDevToolsFrontend::~ShellDevToolsFrontend() { |
} |
-void ShellDevToolsFrontend::RenderViewCreated( |
- RenderViewHost* render_view_host) { |
- DevToolsClientHost::SetupDevToolsFrontendClient( |
- web_contents()->GetRenderViewHost()); |
- DevToolsManager* manager = DevToolsManager::GetInstance(); |
- manager->RegisterDevToolsClientHostFor(agent_host_.get(), |
- frontend_host_.get()); |
-} |
- |
void ShellDevToolsFrontend::DocumentOnLoadCompletedInMainFrame() { |
web_contents()->GetMainFrame()->ExecuteJavaScript( |
base::ASCIIToUTF16("InspectorFrontendAPI.setUseSoftMenu(true);")); |
} |
void ShellDevToolsFrontend::WebContentsDestroyed() { |
- DevToolsManager::GetInstance()->ClientHostClosing(frontend_host_.get()); |
+ DevToolsManager::GetInstance()->ClientHostClosing(this); |
delete this; |
} |
@@ -137,6 +129,21 @@ void ShellDevToolsFrontend::RenderProcessGone(base::TerminationStatus status) { |
WebKitTestController::Get()->DevToolsProcessCrashed(); |
} |
+bool ShellDevToolsFrontend::ShouldSetupDevToolsFrontendForUrl(const GURL& url) { |
+ return true; |
+} |
+ |
+void ShellDevToolsFrontend::HandleMessageFromDevToolsFrontendToBackend( |
+ const std::string& message) { |
+ DevToolsManager::GetInstance()->DispatchOnInspectorBackend( |
+ this, message); |
+} |
+ |
+void ShellDevToolsFrontend::DispatchOnInspectorFrontend( |
+ const std::string& message) { |
+ frontend_host_->DispatchOnDevToolsFrontend(message); |
+} |
+ |
void ShellDevToolsFrontend::InspectedContentsClosing() { |
frontend_shell_->Close(); |
} |