OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_PROTOCOL_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_DEBUGGER_DEVTOOLS_PROTOCOL_HANDLER_H_ |
6 #define CHROME_BROWSER_DEBUGGER_DEVTOOLS_PROTOCOL_HANDLER_H_ | 6 #define CHROME_BROWSER_DEBUGGER_DEVTOOLS_PROTOCOL_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // Unregisters a |listener| so that it will no longer handle messages | 44 // Unregisters a |listener| so that it will no longer handle messages |
45 // directed to the specified |tool_name| tool. | 45 // directed to the specified |tool_name| tool. |
46 void UnregisterDestination(DevToolsRemoteListener* listener, | 46 void UnregisterDestination(DevToolsRemoteListener* listener, |
47 const std::string& tool_name); | 47 const std::string& tool_name); |
48 | 48 |
49 InspectableTabProxy* inspectable_tab_proxy() { | 49 InspectableTabProxy* inspectable_tab_proxy() { |
50 return inspectable_tab_proxy_.get(); | 50 return inspectable_tab_proxy_.get(); |
51 } | 51 } |
52 | 52 |
53 // DevToolsRemoteListener interface | 53 // DevToolsRemoteListener interface |
54 virtual void HandleMessage(const DevToolsRemoteMessage& message); | 54 virtual void HandleMessage(const DevToolsRemoteMessage& message) OVERRIDE; |
55 virtual void OnAcceptConnection(net::ListenSocket *connection); | 55 virtual void OnAcceptConnection(net::ListenSocket *connection) OVERRIDE; |
56 virtual void OnConnectionLost(); | 56 virtual void OnConnectionLost() OVERRIDE; |
57 | 57 |
58 // OutboundSocketDelegate interface | 58 // OutboundSocketDelegate interface |
59 virtual void Send(const DevToolsRemoteMessage& message); | 59 virtual void Send(const DevToolsRemoteMessage& message) OVERRIDE; |
60 | 60 |
61 private: | 61 private: |
62 explicit DevToolsProtocolHandler(int port); | 62 explicit DevToolsProtocolHandler(int port); |
63 virtual ~DevToolsProtocolHandler(); | 63 virtual ~DevToolsProtocolHandler(); |
64 void Start(); | 64 void Start(); |
65 | 65 |
66 void Init(); | 66 void Init(); |
67 void Teardown(); | 67 void Teardown(); |
68 int port_; | 68 int port_; |
69 ToolToListenerMap tool_to_listener_map_; | 69 ToolToListenerMap tool_to_listener_map_; |
70 scoped_refptr<net::ListenSocket> connection_; | 70 scoped_refptr<net::ListenSocket> connection_; |
71 scoped_refptr<DevToolsRemoteListenSocket> server_; | 71 scoped_refptr<DevToolsRemoteListenSocket> server_; |
72 scoped_ptr<InspectableTabProxy> inspectable_tab_proxy_; | 72 scoped_ptr<InspectableTabProxy> inspectable_tab_proxy_; |
73 DISALLOW_COPY_AND_ASSIGN(DevToolsProtocolHandler); | 73 DISALLOW_COPY_AND_ASSIGN(DevToolsProtocolHandler); |
74 }; | 74 }; |
75 | 75 |
76 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_PROTOCOL_HANDLER_H_ | 76 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_PROTOCOL_HANDLER_H_ |
OLD | NEW |