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_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_ |
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include "content/common/content_export.h" |
| 10 |
9 namespace IPC { | 11 namespace IPC { |
10 class Message; | 12 class Message; |
11 } | 13 } |
12 | 14 |
13 // Describes interface for managing devtools agents from the browser process. | 15 // Describes interface for managing devtools agents from the browser process. |
14 class DevToolsAgentHost { | 16 class DevToolsAgentHost { |
15 public: | 17 public: |
16 class CloseListener { | 18 class CONTENT_EXPORT CloseListener { |
17 public: | 19 public: |
18 virtual void AgentHostClosing(DevToolsAgentHost*) = 0; | 20 virtual void AgentHostClosing(DevToolsAgentHost*) = 0; |
19 protected: | 21 protected: |
20 virtual ~CloseListener() {} | 22 virtual ~CloseListener() {} |
21 }; | 23 }; |
22 | 24 |
23 // Sends the message to the devtools agent hosted by this object. | 25 // Sends the message to the devtools agent hosted by this object. |
24 virtual void SendMessageToAgent(IPC::Message* msg) = 0; | 26 virtual void SendMessageToAgent(IPC::Message* msg) = 0; |
25 | 27 |
26 // TODO(yurys): get rid of this method | 28 // TODO(yurys): get rid of this method |
27 virtual void NotifyClientClosing() = 0; | 29 virtual void NotifyClientClosing() = 0; |
28 | 30 |
29 virtual int GetRenderProcessId() = 0; | 31 virtual int GetRenderProcessId() = 0; |
30 | 32 |
31 void set_close_listener(CloseListener* listener) { | 33 void set_close_listener(CloseListener* listener) { |
32 close_listener_ = listener; | 34 close_listener_ = listener; |
33 } | 35 } |
34 | 36 |
35 protected: | 37 protected: |
36 DevToolsAgentHost(); | 38 DevToolsAgentHost(); |
37 virtual ~DevToolsAgentHost() {} | 39 virtual ~DevToolsAgentHost() {} |
38 | 40 |
39 void NotifyCloseListener(); | 41 void NotifyCloseListener(); |
40 | 42 |
41 CloseListener* close_listener_; | 43 CloseListener* close_listener_; |
42 }; | 44 }; |
43 | 45 |
44 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_ | 46 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |