Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: content/browser/devtools/devtools_http_handler.h

Issue 2833213002: DevTools: retain DTAH in all the targets to match their life time. (Closed)
Patch Set: cast test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_agent_host_impl.cc ('k') | content/browser/devtools/devtools_http_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698