| 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 COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_H_ | 5 #ifndef COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_H_ |
| 6 #define COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_H_ | 6 #define COMPONENTS_DEVTOOLS_HTTP_HANDLER_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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 void Send404(int connection_id); | 116 void Send404(int connection_id); |
| 117 void Send500(int connection_id, | 117 void Send500(int connection_id, |
| 118 const std::string& message); | 118 const std::string& message); |
| 119 void AcceptWebSocket(int connection_id, | 119 void AcceptWebSocket(int connection_id, |
| 120 const net::HttpServerRequestInfo& request); | 120 const net::HttpServerRequestInfo& request); |
| 121 | 121 |
| 122 // Returns the front end url without the host at the beginning. | 122 // Returns the front end url without the host at the beginning. |
| 123 std::string GetFrontendURLInternal(const std::string& target_id, | 123 std::string GetFrontendURLInternal(const std::string& target_id, |
| 124 const std::string& host); | 124 const std::string& host); |
| 125 | 125 |
| 126 base::DictionaryValue* SerializeDescriptor( | 126 std::unique_ptr<base::DictionaryValue> SerializeDescriptor( |
| 127 scoped_refptr<content::DevToolsAgentHost> agent_host, | 127 scoped_refptr<content::DevToolsAgentHost> agent_host, |
| 128 const std::string& host); | 128 const std::string& host); |
| 129 | 129 |
| 130 // The thread used by the devtools handler to run server socket. | 130 // The thread used by the devtools handler to run server socket. |
| 131 base::Thread* thread_; | 131 base::Thread* thread_; |
| 132 std::string frontend_url_; | 132 std::string frontend_url_; |
| 133 std::string product_name_; | 133 std::string product_name_; |
| 134 std::string user_agent_; | 134 std::string user_agent_; |
| 135 ServerWrapper* server_wrapper_; | 135 ServerWrapper* server_wrapper_; |
| 136 std::unique_ptr<net::IPEndPoint> server_ip_address_; | 136 std::unique_ptr<net::IPEndPoint> server_ip_address_; |
| 137 typedef std::map<int, DevToolsAgentHostClientImpl*> ConnectionToClientMap; | 137 typedef std::map<int, DevToolsAgentHostClientImpl*> ConnectionToClientMap; |
| 138 ConnectionToClientMap connection_to_client_; | 138 ConnectionToClientMap connection_to_client_; |
| 139 const std::unique_ptr<DevToolsHttpHandlerDelegate> delegate_; | 139 const std::unique_ptr<DevToolsHttpHandlerDelegate> delegate_; |
| 140 ServerSocketFactory* socket_factory_; | 140 ServerSocketFactory* socket_factory_; |
| 141 using DescriptorMap = | 141 using DescriptorMap = |
| 142 std::map<std::string, scoped_refptr<content::DevToolsAgentHost>>; | 142 std::map<std::string, scoped_refptr<content::DevToolsAgentHost>>; |
| 143 DescriptorMap agent_host_map_; | 143 DescriptorMap agent_host_map_; |
| 144 base::WeakPtrFactory<DevToolsHttpHandler> weak_factory_; | 144 base::WeakPtrFactory<DevToolsHttpHandler> weak_factory_; |
| 145 | 145 |
| 146 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandler); | 146 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandler); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace devtools_http_handler | 149 } // namespace devtools_http_handler |
| 150 | 150 |
| 151 #endif // COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_H_ | 151 #endif // COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_H_ |
| OLD | NEW |