| Index: chrome/renderer/devtools_agent.h
|
| ===================================================================
|
| --- chrome/renderer/devtools_agent.h (revision 71253)
|
| +++ chrome/renderer/devtools_agent.h (working copy)
|
| @@ -11,29 +11,34 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "chrome/common/devtools_messages.h"
|
| -#include "ipc/ipc_channel.h"
|
| +#include "chrome/renderer/render_view.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgentClient.h"
|
|
|
| namespace WebKit {
|
| class WebDevToolsAgent;
|
| }
|
|
|
| -class RenderView;
|
| struct DevToolsMessageData;
|
|
|
| // DevToolsAgent belongs to the inspectable RenderView and provides Glue's
|
| // agents with the communication capabilities. All messages from/to Glue's
|
| -// agents infrastructure are flowing through this comminucation agent.
|
| +// agents infrastructure are flowing through this communication agent.
|
| // There is a corresponding DevToolsClient object on the client side.
|
| -class DevToolsAgent : public WebKit::WebDevToolsAgentClient,
|
| - public IPC::Channel::Listener {
|
| +class DevToolsAgent : public RenderView::Observer,
|
| + public WebKit::WebDevToolsAgentClient {
|
| public:
|
| - DevToolsAgent(int routing_id, RenderView* view);
|
| + explicit DevToolsAgent(int routing_id);
|
| virtual ~DevToolsAgent();
|
|
|
| - void OnNavigate();
|
| + // Returns agent instance for its host id.
|
| + static DevToolsAgent* FromHostId(int host_id);
|
|
|
| - // IPC::Channel::Listener implementation.
|
| + WebKit::WebDevToolsAgent* GetWebAgent();
|
| +
|
| + private:
|
| + friend class DevToolsAgentFilter;
|
| +
|
| + // RenderView::Observer implementation.
|
| virtual bool OnMessageReceived(const IPC::Message& message);
|
|
|
| // WebDevToolsAgentClient implementation
|
| @@ -50,26 +55,16 @@
|
| createClientMessageLoop();
|
| virtual bool exposeV8DebuggerProtocol();
|
|
|
| - // Returns agent instance for its host id.
|
| - static DevToolsAgent* FromHostId(int host_id);
|
| -
|
| - RenderView* render_view() { return render_view_; }
|
| -
|
| - WebKit::WebDevToolsAgent* GetWebAgent();
|
| -
|
| - private:
|
| - friend class DevToolsAgentFilter;
|
| -
|
| void OnAttach(const DevToolsRuntimeProperties& runtime_properties);
|
| void OnDetach();
|
| void OnFrontendLoaded();
|
| void OnDispatchOnInspectorBackend(const std::string& message);
|
| void OnInspectElement(int x, int y);
|
| + void OnSetApuAgentEnabled(bool enabled);
|
| + void OnNavigate();
|
|
|
| static std::map<int, DevToolsAgent*> agent_for_routing_id_;
|
|
|
| - int routing_id_; // View routing id that we can access from IO thread.
|
| - RenderView* render_view_;
|
| bool expose_v8_debugger_protocol_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DevToolsAgent);
|
|
|