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