OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_IMPL_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_IMPL_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void OnCloseUI(int connection_id); | 75 void OnCloseUI(int connection_id); |
76 | 76 |
77 void ResetHandlerThread(); | 77 void ResetHandlerThread(); |
78 void ResetHandlerThreadAndRelease(); | 78 void ResetHandlerThreadAndRelease(); |
79 | 79 |
80 void OnTargetListReceived( | 80 void OnTargetListReceived( |
81 int connection_id, | 81 int connection_id, |
82 const std::string& host, | 82 const std::string& host, |
83 const DevToolsManagerDelegate::TargetList& targets); | 83 const DevToolsManagerDelegate::TargetList& targets); |
84 | 84 |
| 85 void OnHttpServerInitialized(const net::IPEndPoint& ip_address); |
| 86 |
85 DevToolsTarget* GetTarget(const std::string& id); | 87 DevToolsTarget* GetTarget(const std::string& id); |
86 | 88 |
87 void Init(); | 89 void Init(); |
88 void Teardown(); | 90 void Teardown(); |
89 | 91 |
90 void StartHandlerThread(); | 92 void StartHandlerThread(); |
91 void StopHandlerThread(); | 93 void StopHandlerThread(); |
92 void StopWithoutRelease(); | 94 void StopWithoutRelease(); |
93 | 95 |
94 void WriteActivePortToUserProfile(); | 96 void WriteActivePortToUserProfile(); |
(...skipping 17 matching lines...) Expand all Loading... |
112 | 114 |
113 base::DictionaryValue* SerializeTarget(const DevToolsTarget& target, | 115 base::DictionaryValue* SerializeTarget(const DevToolsTarget& target, |
114 const std::string& host); | 116 const std::string& host); |
115 | 117 |
116 // The thread used by the devtools handler to run server socket. | 118 // The thread used by the devtools handler to run server socket. |
117 scoped_ptr<base::Thread> thread_; | 119 scoped_ptr<base::Thread> thread_; |
118 | 120 |
119 std::string frontend_url_; | 121 std::string frontend_url_; |
120 const scoped_ptr<ServerSocketFactory> server_socket_factory_; | 122 const scoped_ptr<ServerSocketFactory> server_socket_factory_; |
121 scoped_ptr<net::HttpServer> server_; | 123 scoped_ptr<net::HttpServer> server_; |
| 124 scoped_ptr<net::IPEndPoint> server_ip_address_; |
122 typedef std::map<int, DevToolsAgentHostClient*> ConnectionToClientMap; | 125 typedef std::map<int, DevToolsAgentHostClient*> ConnectionToClientMap; |
123 ConnectionToClientMap connection_to_client_ui_; | 126 ConnectionToClientMap connection_to_client_ui_; |
124 const scoped_ptr<DevToolsHttpHandlerDelegate> delegate_; | 127 const scoped_ptr<DevToolsHttpHandlerDelegate> delegate_; |
125 const base::FilePath active_port_output_directory_; | 128 const base::FilePath active_port_output_directory_; |
126 typedef std::map<std::string, DevToolsTarget*> TargetMap; | 129 typedef std::map<std::string, DevToolsTarget*> TargetMap; |
127 TargetMap target_map_; | 130 TargetMap target_map_; |
128 typedef std::map<int, BrowserTarget*> BrowserTargets; | 131 typedef std::map<int, BrowserTarget*> BrowserTargets; |
129 BrowserTargets browser_targets_; | 132 BrowserTargets browser_targets_; |
130 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandlerImpl); | 133 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandlerImpl); |
131 }; | 134 }; |
132 | 135 |
133 } // namespace content | 136 } // namespace content |
134 | 137 |
135 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_IMPL_H_ | 138 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_IMPL_H_ |
OLD | NEW |