Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: chrome/browser/debugger/devtools_remote.h

Issue 2868036: Brushed up listen socket: (Closed)
Patch Set: Lint. Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_H_ 5 #ifndef CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_H_
6 #define CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_H_ 6 #define CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 10
11 class DevToolsRemoteMessage; 11 class DevToolsRemoteMessage;
12 class ListenSocket;
12 13
13 // This interface should be implemented by a class that wants to handle 14 // This interface should be implemented by a class that wants to handle
14 // DevToolsRemoteMessages dispatched by some entity. It must extend 15 // DevToolsRemoteMessages dispatched by some entity. It must extend
15 class DevToolsRemoteListener 16 class DevToolsRemoteListener
16 : public base::RefCountedThreadSafe<DevToolsRemoteListener> { 17 : public base::RefCountedThreadSafe<DevToolsRemoteListener> {
17 public: 18 public:
18 DevToolsRemoteListener() {} 19 DevToolsRemoteListener() {}
19 virtual void HandleMessage(const DevToolsRemoteMessage& message) = 0; 20 virtual void HandleMessage(const DevToolsRemoteMessage& message) = 0;
20 // This method is invoked on the UI thread whenever the debugger connection 21 // This method is invoked on the UI thread whenever the debugger connection
21 // has been lost. 22 // has been lost.
22 virtual void OnConnectionLost() = 0; 23 virtual void OnConnectionLost() = 0;
24 virtual void OnAcceptConnection(ListenSocket* connection) {}
23 25
24 protected: 26 protected:
25 friend class base::RefCountedThreadSafe<DevToolsRemoteListener>; 27 friend class base::RefCountedThreadSafe<DevToolsRemoteListener>;
26 28
27 virtual ~DevToolsRemoteListener() {} 29 virtual ~DevToolsRemoteListener() {}
28 30
29 private: 31 private:
30 DISALLOW_COPY_AND_ASSIGN(DevToolsRemoteListener); 32 DISALLOW_COPY_AND_ASSIGN(DevToolsRemoteListener);
31 }; 33 };
32 34
33 // Interface exposed by DevToolsProtocolHandler to receive reply messages 35 // Interface exposed by DevToolsProtocolHandler to receive reply messages
34 // from registered tools. 36 // from registered tools.
35 class OutboundSocketDelegate { 37 class OutboundSocketDelegate {
36 public: 38 public:
37 virtual ~OutboundSocketDelegate() {} 39 virtual ~OutboundSocketDelegate() {}
38 virtual void Send(const DevToolsRemoteMessage& message) = 0; 40 virtual void Send(const DevToolsRemoteMessage& message) = 0;
39 }; 41 };
40 42
41 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_H_ 43 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_REMOTE_H_
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_protocol_handler.cc ('k') | chrome/browser/debugger/devtools_remote_listen_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698