| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void OnWebSocketRequest(int connection_id, | 78 void OnWebSocketRequest(int connection_id, |
| 79 const net::HttpServerRequestInfo& info); | 79 const net::HttpServerRequestInfo& info); |
| 80 void OnWebSocketMessage(int connection_id, const std::string& data); | 80 void OnWebSocketMessage(int connection_id, const std::string& data); |
| 81 void OnClose(int connection_id); | 81 void OnClose(int connection_id); |
| 82 | 82 |
| 83 void ServerStarted(base::Thread* thread, | 83 void ServerStarted(base::Thread* thread, |
| 84 ServerWrapper* server_wrapper, | 84 ServerWrapper* server_wrapper, |
| 85 DevToolsSocketFactory* socket_factory, | 85 DevToolsSocketFactory* socket_factory, |
| 86 std::unique_ptr<net::IPEndPoint> ip_address); | 86 std::unique_ptr<net::IPEndPoint> ip_address); |
| 87 | 87 |
| 88 scoped_refptr<DevToolsAgentHost> GetAgentHost( | |
| 89 const std::string& target_id); | |
| 90 | |
| 91 void SendJson(int connection_id, | 88 void SendJson(int connection_id, |
| 92 net::HttpStatusCode status_code, | 89 net::HttpStatusCode status_code, |
| 93 base::Value* value, | 90 base::Value* value, |
| 94 const std::string& message); | 91 const std::string& message); |
| 95 void Send200(int connection_id, | 92 void Send200(int connection_id, |
| 96 const std::string& data, | 93 const std::string& data, |
| 97 const std::string& mime_type); | 94 const std::string& mime_type); |
| 98 void Send404(int connection_id); | 95 void Send404(int connection_id); |
| 99 void Send500(int connection_id, | 96 void Send500(int connection_id, |
| 100 const std::string& message); | 97 const std::string& message); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 114 std::string frontend_url_; | 111 std::string frontend_url_; |
| 115 std::string product_name_; | 112 std::string product_name_; |
| 116 std::string user_agent_; | 113 std::string user_agent_; |
| 117 ServerWrapper* server_wrapper_; | 114 ServerWrapper* server_wrapper_; |
| 118 std::unique_ptr<net::IPEndPoint> server_ip_address_; | 115 std::unique_ptr<net::IPEndPoint> server_ip_address_; |
| 119 using ConnectionToClientMap = | 116 using ConnectionToClientMap = |
| 120 std::map<int, std::unique_ptr<DevToolsAgentHostClientImpl>>; | 117 std::map<int, std::unique_ptr<DevToolsAgentHostClientImpl>>; |
| 121 ConnectionToClientMap connection_to_client_; | 118 ConnectionToClientMap connection_to_client_; |
| 122 DevToolsManagerDelegate* delegate_; | 119 DevToolsManagerDelegate* delegate_; |
| 123 DevToolsSocketFactory* socket_factory_; | 120 DevToolsSocketFactory* socket_factory_; |
| 124 using DescriptorMap = | |
| 125 std::map<std::string, scoped_refptr<DevToolsAgentHost>>; | |
| 126 DescriptorMap agent_host_map_; | |
| 127 base::WeakPtrFactory<DevToolsHttpHandler> weak_factory_; | 121 base::WeakPtrFactory<DevToolsHttpHandler> weak_factory_; |
| 128 | 122 |
| 129 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandler); | 123 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandler); |
| 130 }; | 124 }; |
| 131 | 125 |
| 132 } // namespace content | 126 } // namespace content |
| 133 | 127 |
| 134 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ | 128 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_HTTP_HANDLER_H_ |
| OLD | NEW |