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