| Index: content/browser/devtools/protocol/tethering_handler.h
|
| diff --git a/content/browser/devtools/tethering_handler.h b/content/browser/devtools/protocol/tethering_handler.h
|
| similarity index 56%
|
| rename from content/browser/devtools/tethering_handler.h
|
| rename to content/browser/devtools/protocol/tethering_handler.h
|
| index d6e56b592fd7a2176a86dfc6a5655ddb2efe41a0..a1b808217258549e300ed752f49d598f4150421f 100644
|
| --- a/content/browser/devtools/tethering_handler.h
|
| +++ b/content/browser/devtools/protocol/tethering_handler.h
|
| @@ -1,26 +1,34 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CONTENT_BROWSER_DEVTOOLS_TETHERING_HANDLER_H_
|
| -#define CONTENT_BROWSER_DEVTOOLS_TETHERING_HANDLER_H_
|
| +#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TETHERING_HANDLER_H_
|
| +#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TETHERING_HANDLER_H_
|
|
|
| -#include <map>
|
| -
|
| -#include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| -#include "content/browser/devtools/devtools_protocol.h"
|
| +#include "base/message_loop/message_loop_proxy.h"
|
| +#include "content/browser/devtools/protocol/devtools_protocol_handler_impl.h"
|
|
|
| namespace content {
|
|
|
| class DevToolsHttpHandlerDelegate;
|
|
|
| +namespace devtools {
|
| +namespace tethering {
|
| +
|
| // This class implements reversed tethering handler.
|
| -class TetheringHandler : public DevToolsProtocol::Handler {
|
| +class TetheringHandler {
|
| public:
|
| TetheringHandler(DevToolsHttpHandlerDelegate* delegate,
|
| scoped_refptr<base::MessageLoopProxy> message_loop_proxy);
|
| - ~TetheringHandler() override;
|
| + ~TetheringHandler();
|
| +
|
| + void SetClient(scoped_ptr<Client> client);
|
| +
|
| + scoped_refptr<DevToolsProtocol::Response> Bind(
|
| + int port, scoped_refptr<DevToolsProtocol::Command> command);
|
| + scoped_refptr<DevToolsProtocol::Response> Unbind(
|
| + int port, scoped_refptr<DevToolsProtocol::Command> command);
|
|
|
| private:
|
| class TetheringImpl;
|
| @@ -28,16 +36,12 @@ class TetheringHandler : public DevToolsProtocol::Handler {
|
| void Accepted(int port, const std::string& name);
|
| bool Activate();
|
|
|
| - scoped_refptr<DevToolsProtocol::Response> OnBind(
|
| - scoped_refptr<DevToolsProtocol::Command> command);
|
| - scoped_refptr<DevToolsProtocol::Response> OnUnbind(
|
| - scoped_refptr<DevToolsProtocol::Command> command);
|
| -
|
| void SendBindSuccess(scoped_refptr<DevToolsProtocol::Command> command);
|
| void SendUnbindSuccess(scoped_refptr<DevToolsProtocol::Command> command);
|
| void SendInternalError(scoped_refptr<DevToolsProtocol::Command> command,
|
| const std::string& message);
|
|
|
| + scoped_ptr<Client> client_;
|
| DevToolsHttpHandlerDelegate* delegate_;
|
| scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
|
| bool is_active_;
|
| @@ -48,6 +52,8 @@ class TetheringHandler : public DevToolsProtocol::Handler {
|
| DISALLOW_COPY_AND_ASSIGN(TetheringHandler);
|
| };
|
|
|
| +} // namespace tethering
|
| +} // namespace devtools
|
| } // namespace content
|
|
|
| -#endif // CONTENT_BROWSER_DEVTOOLS_TETHERING_HANDLER_H_
|
| +#endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TETHERING_HANDLER_H_
|
|
|