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