| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_H_ | |
| 6 #define CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/memory/ref_counted.h" | |
| 11 | |
| 12 class DevToolsRemoteMessage; | |
| 13 | |
| 14 namespace net { | |
| 15 class ListenSocket; | |
| 16 } | |
| 17 | |
| 18 // This interface should be implemented by a class that wants to handle | |
| 19 // DevToolsRemoteMessages dispatched by some entity. It must extend | |
| 20 class DevToolsRemoteListener | |
| 21 : public base::RefCountedThreadSafe<DevToolsRemoteListener> { | |
| 22 public: | |
| 23 DevToolsRemoteListener() {} | |
| 24 virtual void HandleMessage(const DevToolsRemoteMessage& message) = 0; | |
| 25 // This method is invoked on the UI thread whenever the debugger connection | |
| 26 // has been lost. | |
| 27 virtual void OnConnectionLost() = 0; | |
| 28 virtual void OnAcceptConnection(net::ListenSocket* connection) {} | |
| 29 | |
| 30 protected: | |
| 31 friend class base::RefCountedThreadSafe<DevToolsRemoteListener>; | |
| 32 | |
| 33 virtual ~DevToolsRemoteListener() {} | |
| 34 | |
| 35 private: | |
| 36 DISALLOW_COPY_AND_ASSIGN(DevToolsRemoteListener); | |
| 37 }; | |
| 38 | |
| 39 // Interface exposed by DevToolsProtocolHandler to receive reply messages | |
| 40 // from registered tools. | |
| 41 class OutboundSocketDelegate { | |
| 42 public: | |
| 43 virtual ~OutboundSocketDelegate() {} | |
| 44 virtual void Send(const DevToolsRemoteMessage& message) = 0; | |
| 45 }; | |
| 46 | |
| 47 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_H_ | |
| OLD | NEW |