OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_DEVTOOLS_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
7 | 7 |
8 #include "content/browser/devtools/devtools_agent_host_impl.h" | 8 #include "content/browser/devtools/devtools_agent_host_impl.h" |
| 9 #include "content/browser/devtools/protocol/forward.h" |
9 | 10 |
10 namespace content { | 11 namespace content { |
11 | 12 |
12 class DevToolsProtocolHandler; | 13 class DevToolsProtocolHandler; |
13 | 14 |
14 namespace devtools { | 15 namespace devtools { |
15 namespace io { class IOHandler; } | |
16 namespace memory { class MemoryHandler; } | 16 namespace memory { class MemoryHandler; } |
17 namespace system_info { class SystemInfoHandler; } | 17 namespace system_info { class SystemInfoHandler; } |
18 namespace tethering { class TetheringHandler; } | 18 namespace tethering { class TetheringHandler; } |
19 namespace tracing { class TracingHandler; } | |
20 } // namespace devtools | 19 } // namespace devtools |
21 | 20 |
| 21 namespace protocol { |
| 22 class IOHandler; |
| 23 class TracingHandler; |
| 24 } // namespace protocol |
| 25 |
22 class BrowserDevToolsAgentHost : public DevToolsAgentHostImpl { | 26 class BrowserDevToolsAgentHost : public DevToolsAgentHostImpl { |
23 private: | 27 private: |
24 friend class DevToolsAgentHost; | 28 friend class DevToolsAgentHost; |
25 BrowserDevToolsAgentHost( | 29 BrowserDevToolsAgentHost( |
26 scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner, | 30 scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner, |
27 const CreateServerSocketCallback& socket_callback); | 31 const CreateServerSocketCallback& socket_callback); |
28 ~BrowserDevToolsAgentHost() override; | 32 ~BrowserDevToolsAgentHost() override; |
29 | 33 |
30 // DevToolsAgentHostImpl implementation. | 34 // DevToolsAgentHostImpl implementation. |
31 void Attach() override; | 35 void Attach() override; |
32 void Detach() override; | 36 void Detach() override; |
33 | 37 |
34 // DevToolsAgentHost implementation. | 38 // DevToolsAgentHost implementation. |
35 std::string GetType() override; | 39 std::string GetType() override; |
36 std::string GetTitle() override; | 40 std::string GetTitle() override; |
37 GURL GetURL() override; | 41 GURL GetURL() override; |
38 bool Activate() override; | 42 bool Activate() override; |
39 void Reload() override; | 43 void Reload() override; |
40 bool Close() override; | 44 bool Close() override; |
41 bool DispatchProtocolMessage(const std::string& message) override; | 45 bool DispatchProtocolMessage(const std::string& message) override; |
42 | 46 |
43 std::unique_ptr<devtools::io::IOHandler> io_handler_; | 47 std::unique_ptr<protocol::IOHandler> io_handler_; |
44 std::unique_ptr<devtools::memory::MemoryHandler> memory_handler_; | 48 std::unique_ptr<devtools::memory::MemoryHandler> memory_handler_; |
45 std::unique_ptr<devtools::system_info::SystemInfoHandler> | 49 std::unique_ptr<devtools::system_info::SystemInfoHandler> |
46 system_info_handler_; | 50 system_info_handler_; |
47 std::unique_ptr<devtools::tethering::TetheringHandler> tethering_handler_; | 51 std::unique_ptr<devtools::tethering::TetheringHandler> tethering_handler_; |
48 std::unique_ptr<devtools::tracing::TracingHandler> tracing_handler_; | 52 std::unique_ptr<protocol::TracingHandler> tracing_handler_; |
49 std::unique_ptr<DevToolsProtocolHandler> protocol_handler_; | 53 std::unique_ptr<DevToolsProtocolHandler> protocol_handler_; |
| 54 std::unique_ptr<protocol::UberDispatcher> protocol_dispatcher_; |
50 }; | 55 }; |
51 | 56 |
52 } // namespace content | 57 } // namespace content |
53 | 58 |
54 #endif // CONTENT_BROWSER_DEVTOOLS_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 59 #endif // CONTENT_BROWSER_DEVTOOLS_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |