1 // Copyright (c) 2012 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_TETHERING_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_TETHERING_HANDLER_H_
10 #include "content/browser/devtools/devtools_protocol.h"
14 class DevToolsHttpHandlerDelegate
;
16 // This class implements reversed tethering handler.
17 class TetheringHandler
: public DevToolsProtocol::Handler
{
19 static const char kDomain
[];
21 TetheringHandler(DevToolsHttpHandlerDelegate
* delegate
);
22 virtual ~TetheringHandler();
24 void Accepted(int port
, const std::string
& name
);
28 scoped_refptr
<DevToolsProtocol::Response
> OnBind(
29 scoped_refptr
<DevToolsProtocol::Command
> command
);
30 scoped_refptr
<DevToolsProtocol::Response
> OnUnbind(
31 scoped_refptr
<DevToolsProtocol::Command
> command
);
33 typedef std::map
<int, BoundSocket
*> BoundSockets
;
34 BoundSockets bound_sockets_
;
35 DevToolsHttpHandlerDelegate
* delegate_
;
36 DISALLOW_COPY_AND_ASSIGN(TetheringHandler
);
39 } // namespace content
41 #endif // CONTENT_BROWSER_DEVTOOLS_TETHERING_HANDLER_H_