| 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_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // socket_factory was initialized with an ephemeral port (0). The | 53 // socket_factory was initialized with an ephemeral port (0). The |
| 54 // port selected by the OS will be written to a well-known file in | 54 // port selected by the OS will be written to a well-known file in |
| 55 // the output directory. | 55 // the output directory. |
| 56 DevToolsHttpHandler( | 56 DevToolsHttpHandler( |
| 57 DevToolsManagerDelegate* delegate, | 57 DevToolsManagerDelegate* delegate, |
| 58 std::unique_ptr<DevToolsSocketFactory> server_socket_factory, | 58 std::unique_ptr<DevToolsSocketFactory> server_socket_factory, |
| 59 const std::string& frontend_url, | 59 const std::string& frontend_url, |
| 60 const base::FilePath& active_port_output_directory, | 60 const base::FilePath& active_port_output_directory, |
| 61 const base::FilePath& debug_frontend_dir, | 61 const base::FilePath& debug_frontend_dir, |
| 62 const std::string& product_name, | 62 const std::string& product_name, |
| 63 const std::string& user_agent); | 63 const std::string& user_agent, |
| 64 const std::string& js_engine_version); |
| 64 ~DevToolsHttpHandler(); | 65 ~DevToolsHttpHandler(); |
| 65 | 66 |
| 66 private: | 67 private: |
| 67 friend class ServerWrapper; | 68 friend class ServerWrapper; |
| 68 friend void ServerStartedOnUI( | 69 friend void ServerStartedOnUI( |
| 69 base::WeakPtr<DevToolsHttpHandler> handler, | 70 base::WeakPtr<DevToolsHttpHandler> handler, |
| 70 base::Thread* thread, | 71 base::Thread* thread, |
| 71 ServerWrapper* server_wrapper, | 72 ServerWrapper* server_wrapper, |
| 72 DevToolsSocketFactory* socket_factory, | 73 DevToolsSocketFactory* socket_factory, |
| 73 std::unique_ptr<net::IPEndPoint> ip_address); | 74 std::unique_ptr<net::IPEndPoint> ip_address); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 112 |
| 112 std::unique_ptr<base::DictionaryValue> SerializeDescriptor( | 113 std::unique_ptr<base::DictionaryValue> SerializeDescriptor( |
| 113 scoped_refptr<DevToolsAgentHost> agent_host, | 114 scoped_refptr<DevToolsAgentHost> agent_host, |
| 114 const std::string& host); | 115 const std::string& host); |
| 115 | 116 |
| 116 // The thread used by the devtools handler to run server socket. | 117 // The thread used by the devtools handler to run server socket. |
| 117 base::Thread* thread_; | 118 base::Thread* thread_; |
| 118 std::string frontend_url_; | 119 std::string frontend_url_; |
| 119 std::string product_name_; | 120 std::string product_name_; |
| 120 std::string user_agent_; | 121 std::string user_agent_; |
| 122 std::string js_engine_version_; |
| 121 ServerWrapper* server_wrapper_; | 123 ServerWrapper* server_wrapper_; |
| 122 std::unique_ptr<net::IPEndPoint> server_ip_address_; | 124 std::unique_ptr<net::IPEndPoint> server_ip_address_; |
| 123 using ConnectionToClientMap = | 125 using ConnectionToClientMap = |
| 124 std::map<int, std::unique_ptr<DevToolsAgentHostClientImpl>>; | 126 std::map<int, std::unique_ptr<DevToolsAgentHostClientImpl>>; |
| 125 ConnectionToClientMap connection_to_client_; | 127 ConnectionToClientMap connection_to_client_; |
| 126 DevToolsManagerDelegate* delegate_; | 128 DevToolsManagerDelegate* delegate_; |
| 127 DevToolsSocketFactory* socket_factory_; | 129 DevToolsSocketFactory* socket_factory_; |
| 128 using DescriptorMap = | 130 using DescriptorMap = |
| 129 std::map<std::string, scoped_refptr<DevToolsAgentHost>>; | 131 std::map<std::string, scoped_refptr<DevToolsAgentHost>>; |
| 130 DescriptorMap agent_host_map_; | 132 DescriptorMap agent_host_map_; |
| 131 base::WeakPtrFactory<DevToolsHttpHandler> weak_factory_; | 133 base::WeakPtrFactory<DevToolsHttpHandler> weak_factory_; |
| 132 | 134 |
| 133 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandler); | 135 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandler); |
| 134 }; | 136 }; |
| 135 | 137 |
| 136 } // namespace content | 138 } // namespace content |
| 137 | 139 |
| 138 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ | 140 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ |
| OLD | NEW |