OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
6 #define CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "content/browser/debugger/devtools_agent_host.h" | 12 #include "content/browser/debugger/devtools_agent_host.h" |
13 #include "content/browser/renderer_host/render_view_host_observer.h" | 13 #include "content/browser/renderer_host/render_view_host_observer.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 | 15 |
16 class RenderViewHost; | 16 class RenderViewHost; |
17 class TabContents; | 17 class TabContents; |
18 | 18 |
19 class CONTENT_EXPORT RenderViewDevToolsAgentHost | 19 class CONTENT_EXPORT RenderViewDevToolsAgentHost |
20 : public DevToolsAgentHost, private RenderViewHostObserver { | 20 : public DevToolsAgentHost, private RenderViewHostObserver { |
21 public: | 21 public: |
22 static DevToolsAgentHost* FindFor(RenderViewHost*); | 22 static DevToolsAgentHost* FindFor(RenderViewHost*); |
23 static bool IsDebuggerAttached(TabContents*); | 23 static bool IsDebuggerAttached(TabContents*); |
24 | 24 |
25 private: | 25 private: |
26 RenderViewDevToolsAgentHost(RenderViewHost*); | 26 RenderViewDevToolsAgentHost(RenderViewHost*); |
27 virtual ~RenderViewDevToolsAgentHost(); | 27 virtual ~RenderViewDevToolsAgentHost(); |
28 | 28 |
29 // DevToolsAgentHost implementation. | 29 // DevToolsAgentHost implementation. |
30 virtual void SendMessageToAgent(IPC::Message* msg); | 30 virtual void SendMessageToAgent(IPC::Message* msg) OVERRIDE; |
31 virtual void NotifyClientClosing(); | 31 virtual void NotifyClientClosing() OVERRIDE; |
32 virtual int GetRenderProcessId(); | 32 virtual int GetRenderProcessId() OVERRIDE; |
33 | 33 |
34 // RenderViewHostObserver overrides. | 34 // RenderViewHostObserver overrides. |
35 virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE; | 35 virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE; |
36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
37 | 37 |
38 void OnForwardToClient(const IPC::Message& message); | 38 void OnForwardToClient(const IPC::Message& message); |
39 void OnSaveAgentRuntimeState(const std::string& state); | 39 void OnSaveAgentRuntimeState(const std::string& state); |
40 void OnClearBrowserCache(); | 40 void OnClearBrowserCache(); |
41 void OnClearBrowserCookies(); | 41 void OnClearBrowserCookies(); |
42 | 42 |
43 RenderViewHost* render_view_host_; | 43 RenderViewHost* render_view_host_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost); | 45 DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost); |
46 }; | 46 }; |
47 | 47 |
48 #endif // CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ | 48 #endif // CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |