OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 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_PUBLIC_BROWSER_DEVTOOLS_REMOTE_AGENT_CONNECTOR_H_ | |
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_REMOTE_AGENT_CONNECTOR_H_ | |
7 | |
8 #include "content/common/content_export.h" | |
9 | |
10 namespace content { | |
11 | |
12 class DevToolsAgentHost; | |
13 | |
14 // Describes interface for sending messages to a remote DevTools agent. | |
15 class CONTENT_EXPORT DevToolsRemoteAgentConnector { | |
pfeldman
2013/03/21 06:24:32
"Connector" does not give me enough information, I
Vladislav Kaznacheev
2013/03/21 06:55:53
It does sound better but still not good enough. Ho
| |
16 public: | |
17 | |
pfeldman
2013/03/21 06:24:32
Extra blank line.
Vladislav Kaznacheev
2013/03/21 06:55:53
Done.
| |
18 class Delegate { | |
19 public: | |
20 // Informs the remote agent that DevToolsAgentHost attached. | |
21 virtual void Attach() {}; | |
22 | |
23 // Informs the remote agent that DevToolsAgentHost detached. | |
24 virtual void Detach() {}; | |
25 | |
26 // Sends a message to a remote agent. | |
27 virtual void Send(const std::string& message) {}; | |
pfeldman
2013/03/21 06:24:32
SendMessageToBackend
Vladislav Kaznacheev
2013/03/21 06:55:53
Done.
| |
28 | |
29 protected: | |
30 virtual ~Delegate() {} | |
31 }; | |
32 | |
33 // Creates DevToolsAgentHost that communicates with a remote agent via | |
34 // the provided |delegate|. | |
35 // The |delegate| object is not owned by the connector. | |
pfeldman
2013/03/21 06:24:32
It is not clear it creates DevToolsAgentHost from
Vladislav Kaznacheev
2013/03/21 06:55:53
"creates DevToolsAgentHost" was a typo. Changed th
| |
36 static DevToolsRemoteAgentConnector* CreateFor(Delegate* delegate); | |
37 | |
38 // Returns the agent host associated with this connector. | |
39 virtual DevToolsAgentHost* GetAgentHost() = 0; | |
pfeldman
2013/03/21 06:24:32
What does associated with the connector mean?
Vladislav Kaznacheev
2013/03/21 06:55:53
Changed to "Returns the local DevToolsAgentHost fo
| |
40 | |
41 // To be called when the connection is closed. | |
42 virtual void ConnectionClosed() = 0; | |
pfeldman
2013/03/21 06:24:32
Adding convenience DispatchMessageFromFrontend wou
Vladislav Kaznacheev
2013/03/21 06:55:53
Cannot remove the getter as we need to pass DevToo
| |
43 | |
44 virtual ~DevToolsRemoteAgentConnector() {} | |
45 }; | |
46 | |
47 } // namespace content | |
48 | |
49 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_REMOTE_AGENT_CONNECTOR_H_ | |
OLD | NEW |