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/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "content/public/browser/render_view_host_observer.h" | 14 #include "content/public/browser/render_view_host_observer.h" |
15 | 15 |
16 class RenderViewHost; | 16 class RenderViewHost; |
17 class TabContents; | 17 class TabContents; |
18 | 18 |
| 19 namespace content { |
| 20 |
19 class CONTENT_EXPORT RenderViewDevToolsAgentHost | 21 class CONTENT_EXPORT RenderViewDevToolsAgentHost |
20 : public DevToolsAgentHost, | 22 : public DevToolsAgentHost, |
21 private content::RenderViewHostObserver { | 23 private content::RenderViewHostObserver { |
22 public: | 24 public: |
23 static DevToolsAgentHost* FindFor(RenderViewHost*); | 25 RenderViewDevToolsAgentHost(RenderViewHost*); |
24 static bool IsDebuggerAttached(TabContents*); | |
25 | 26 |
26 private: | 27 private: |
27 RenderViewDevToolsAgentHost(RenderViewHost*); | |
28 virtual ~RenderViewDevToolsAgentHost(); | 28 virtual ~RenderViewDevToolsAgentHost(); |
29 | 29 |
30 // DevToolsAgentHost implementation. | 30 // DevToolsAgentHost implementation. |
31 virtual void SendMessageToAgent(IPC::Message* msg) OVERRIDE; | 31 virtual void SendMessageToAgent(IPC::Message* msg) OVERRIDE; |
32 virtual void NotifyClientClosing() OVERRIDE; | 32 virtual void NotifyClientClosing() OVERRIDE; |
33 virtual int GetRenderProcessId() OVERRIDE; | 33 virtual int GetRenderProcessId() OVERRIDE; |
34 | 34 |
35 // content::RenderViewHostObserver overrides. | 35 // content::RenderViewHostObserver overrides. |
36 virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE; | 36 virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE; |
37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
38 | 38 |
39 void OnForwardToClient(const IPC::Message& message); | 39 void OnDispatchOnInspectorFrontend(const std::string& message); |
40 void OnSaveAgentRuntimeState(const std::string& state); | 40 void OnSaveAgentRuntimeState(const std::string& state); |
41 void OnClearBrowserCache(); | 41 void OnClearBrowserCache(); |
42 void OnClearBrowserCookies(); | 42 void OnClearBrowserCookies(); |
43 | 43 |
44 RenderViewHost* render_view_host_; | 44 RenderViewHost* render_view_host_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost); | 46 DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost); |
47 }; | 47 }; |
48 | 48 |
| 49 } // namespace content |
| 50 |
49 #endif // CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ | 51 #endif // CONTENT_BROWSER_DEBUGGER_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |