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