Respond with QuotaExceededError when IndexedDB has no disk space on open.
[chromium-blink-merge.git] / content / browser / devtools / tethering_handler.h
blob7086e1747dbf89db2aa8c253c85daa12c73856c7
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_
8 #include <map>
10 #include "content/browser/devtools/devtools_protocol.h"
12 namespace content {
14 class DevToolsHttpHandlerDelegate;
16 // This class implements reversed tethering handler.
17 class TetheringHandler : public DevToolsProtocol::Handler {
18 public:
19 static const char kDomain[];
21 TetheringHandler(DevToolsHttpHandlerDelegate* delegate);
22 virtual ~TetheringHandler();
24 void Accepted(int port, const std::string& name);
26 private:
27 class BoundSocket;
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_