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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_DEVTOOLS_BROWSER_DEVTOOLS_AGENT_HOST_H_
6 #define CONTENT_BROWSER_DEVTOOLS_BROWSER_DEVTOOLS_AGENT_HOST_H_
8 #include "content/browser/devtools/devtools_agent_host_impl.h"
12 class DevToolsProtocolHandler
;
15 namespace io
{ class IOHandler
; }
16 namespace system_info
{ class SystemInfoHandler
; }
17 namespace tethering
{ class TetheringHandler
; }
18 namespace tracing
{ class TracingHandler
; }
19 } // namespace devtools
21 class BrowserDevToolsAgentHost
: public DevToolsAgentHostImpl
{
23 friend class DevToolsAgentHost
;
24 BrowserDevToolsAgentHost(
25 scoped_refptr
<base::SingleThreadTaskRunner
> tethering_task_runner
,
26 const CreateServerSocketCallback
& socket_callback
);
27 ~BrowserDevToolsAgentHost() override
;
29 // DevToolsAgentHostImpl implementation.
30 void Attach() override
;
31 void Detach() override
;
33 // DevToolsAgentHost implementation.
34 Type
GetType() override
;
35 std::string
GetTitle() override
;
36 GURL
GetURL() override
;
37 bool Activate() override
;
38 bool Close() override
;
39 bool DispatchProtocolMessage(const std::string
& message
) override
;
41 scoped_ptr
<devtools::io::IOHandler
> io_handler_
;
42 scoped_ptr
<devtools::system_info::SystemInfoHandler
> system_info_handler_
;
43 scoped_ptr
<devtools::tethering::TetheringHandler
> tethering_handler_
;
44 scoped_ptr
<devtools::tracing::TracingHandler
> tracing_handler_
;
45 scoped_ptr
<DevToolsProtocolHandler
> protocol_handler_
;
48 } // namespace content
50 #endif // CONTENT_BROWSER_DEVTOOLS_BROWSER_DEVTOOLS_AGENT_HOST_H_