Commit d8a95de4 authored by kkania@chromium.org's avatar kkania@chromium.org

Fix naming of DevToolsAgentHostImpl::DipatchOnInspectorBackend (Dipatch ->...

Fix naming of DevToolsAgentHostImpl::DipatchOnInspectorBackend (Dipatch -> Dispatch). Make it virtual and override in RenderViewDevToolsAgentHost.

Right now the overridden version just calls the parent method. Next CL will change this to allow for request interception and optional handling.
BUG=167100

Review URL: https://chromiumcodereview.appspot.com/12209107

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182361 0039d316-1c4b-4281-b951-d872f2087c98
parent a0c49191
...@@ -35,7 +35,7 @@ void DevToolsAgentHostImpl::Detach() { ...@@ -35,7 +35,7 @@ void DevToolsAgentHostImpl::Detach() {
NotifyClientDetaching(); NotifyClientDetaching();
} }
void DevToolsAgentHostImpl::DipatchOnInspectorBackend( void DevToolsAgentHostImpl::DispatchOnInspectorBackend(
const std::string& message) { const std::string& message) {
SendMessageToAgent(new DevToolsAgentMsg_DispatchOnInspectorBackend( SendMessageToAgent(new DevToolsAgentMsg_DispatchOnInspectorBackend(
MSG_ROUTING_NONE, message)); MSG_ROUTING_NONE, message));
......
...@@ -32,7 +32,7 @@ class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost { ...@@ -32,7 +32,7 @@ class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost {
void Attach(); void Attach();
void Reattach(const std::string& saved_agent_state); void Reattach(const std::string& saved_agent_state);
void Detach(); void Detach();
void DipatchOnInspectorBackend(const std::string& message); virtual void DispatchOnInspectorBackend(const std::string& message);
void InspectElement(int x, int y); void InspectElement(int x, int y);
void AddMessageToConsole(ConsoleMessageLevel level, void AddMessageToConsole(ConsoleMessageLevel level,
const std::string& message); const std::string& message);
......
...@@ -72,7 +72,7 @@ bool DevToolsManagerImpl::DispatchOnInspectorBackend( ...@@ -72,7 +72,7 @@ bool DevToolsManagerImpl::DispatchOnInspectorBackend(
return false; return false;
DevToolsAgentHostImpl* agent_host_impl = DevToolsAgentHostImpl* agent_host_impl =
static_cast<DevToolsAgentHostImpl*>(agent_host); static_cast<DevToolsAgentHostImpl*>(agent_host);
agent_host_impl->DipatchOnInspectorBackend(message); agent_host_impl->DispatchOnInspectorBackend(message);
return true; return true;
} }
......
...@@ -147,6 +147,11 @@ RenderViewHost* RenderViewDevToolsAgentHost::GetRenderViewHost() { ...@@ -147,6 +147,11 @@ RenderViewHost* RenderViewDevToolsAgentHost::GetRenderViewHost() {
return render_view_host_; return render_view_host_;
} }
void RenderViewDevToolsAgentHost::DispatchOnInspectorBackend(
const std::string& message) {
DevToolsAgentHostImpl::DispatchOnInspectorBackend(message);
}
void RenderViewDevToolsAgentHost::SendMessageToAgent(IPC::Message* msg) { void RenderViewDevToolsAgentHost::SendMessageToAgent(IPC::Message* msg) {
msg->set_routing_id(render_view_host_->GetRoutingID()); msg->set_routing_id(render_view_host_->GetRoutingID());
render_view_host_->Send(msg); render_view_host_->Send(msg);
......
...@@ -17,9 +17,8 @@ ...@@ -17,9 +17,8 @@
namespace content { namespace content {
class RenderViewHost;
class DevToolsAgentHostRvhObserver; class DevToolsAgentHostRvhObserver;
class RenderViewHost;
class CONTENT_EXPORT RenderViewDevToolsAgentHost class CONTENT_EXPORT RenderViewDevToolsAgentHost
: public DevToolsAgentHostImpl, : public DevToolsAgentHostImpl,
...@@ -41,6 +40,9 @@ class CONTENT_EXPORT RenderViewDevToolsAgentHost ...@@ -41,6 +40,9 @@ class CONTENT_EXPORT RenderViewDevToolsAgentHost
// DevTooolsAgentHost overrides. // DevTooolsAgentHost overrides.
virtual RenderViewHost* GetRenderViewHost() OVERRIDE; virtual RenderViewHost* GetRenderViewHost() OVERRIDE;
// DevToolsAgentHostImpl overrides.
virtual void DispatchOnInspectorBackend(const std::string& message) OVERRIDE;
// DevToolsAgentHostImpl implementation. // DevToolsAgentHostImpl implementation.
virtual void SendMessageToAgent(IPC::Message* msg) OVERRIDE; virtual void SendMessageToAgent(IPC::Message* msg) OVERRIDE;
virtual void NotifyClientAttaching() OVERRIDE; virtual void NotifyClientAttaching() OVERRIDE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment