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

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

Issue 2366773003: [DevTools] Avoid current_ and pending_ being the same host in RenderFrameDevToolsAgentHost. (Closed)
Patch Set: rebased, win failure Created 4 years, 2 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_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_
6 #define CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void OnClientDetached(); 155 void OnClientDetached();
156 156
157 void RenderFrameCrashed(); 157 void RenderFrameCrashed();
158 void OnSwapCompositorFrame(const IPC::Message& message); 158 void OnSwapCompositorFrame(const IPC::Message& message);
159 void OnDispatchOnInspectorFrontend( 159 void OnDispatchOnInspectorFrontend(
160 RenderFrameHost* sender, 160 RenderFrameHost* sender,
161 const DevToolsMessageChunk& message); 161 const DevToolsMessageChunk& message);
162 void OnRequestNewWindow(RenderFrameHost* sender, int new_routing_id); 162 void OnRequestNewWindow(RenderFrameHost* sender, int new_routing_id);
163 void DestroyOnRenderFrameGone(); 163 void DestroyOnRenderFrameGone();
164 164
165 bool CheckConsistency();
166
165 void CreatePowerSaveBlocker(); 167 void CreatePowerSaveBlocker();
166 168
167 class FrameHostHolder; 169 class FrameHostHolder;
168 170
169 std::unique_ptr<FrameHostHolder> current_; 171 std::unique_ptr<FrameHostHolder> current_;
170 std::unique_ptr<FrameHostHolder> pending_; 172 std::unique_ptr<FrameHostHolder> pending_;
171 173
172 // Stores per-host state between DisconnectWebContents and ConnectWebContents. 174 // Stores per-host state between DisconnectWebContents and ConnectWebContents.
173 std::unique_ptr<FrameHostHolder> disconnected_; 175 std::unique_ptr<FrameHostHolder> disconnected_;
174 176
(...skipping 11 matching lines...) Expand all
186 std::unique_ptr<devtools::storage::StorageHandler> 188 std::unique_ptr<devtools::storage::StorageHandler>
187 storage_handler_; 189 storage_handler_;
188 std::unique_ptr<devtools::target::TargetHandler> target_handler_; 190 std::unique_ptr<devtools::target::TargetHandler> target_handler_;
189 std::unique_ptr<devtools::tracing::TracingHandler> tracing_handler_; 191 std::unique_ptr<devtools::tracing::TracingHandler> tracing_handler_;
190 std::unique_ptr<devtools::emulation::EmulationHandler> emulation_handler_; 192 std::unique_ptr<devtools::emulation::EmulationHandler> emulation_handler_;
191 std::unique_ptr<DevToolsFrameTraceRecorder> frame_trace_recorder_; 193 std::unique_ptr<DevToolsFrameTraceRecorder> frame_trace_recorder_;
192 #if defined(OS_ANDROID) 194 #if defined(OS_ANDROID)
193 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; 195 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
194 #endif 196 #endif
195 std::unique_ptr<DevToolsProtocolHandler> protocol_handler_; 197 std::unique_ptr<DevToolsProtocolHandler> protocol_handler_;
198 RenderFrameHostImpl* handlers_frame_host_;
196 bool current_frame_crashed_; 199 bool current_frame_crashed_;
197 200
198 // PlzNavigate 201 // PlzNavigate
199 202
200 // Handle that caused the setting of pending_. 203 // Handle that caused the setting of pending_.
201 NavigationHandle* pending_handle_; 204 NavigationHandle* pending_handle_;
202 205
203 // List of handles currently navigating. 206 // List of handles currently navigating.
204 std::set<NavigationHandle*> navigating_handles_; 207 std::set<NavigationHandle*> navigating_handles_;
205 208
206 struct PendingMessage { 209 struct PendingMessage {
207 int session_id; 210 int session_id;
208 std::string method; 211 std::string method;
209 std::string message; 212 std::string message;
210 }; 213 };
211 // <call_id> -> PendingMessage 214 // <call_id> -> PendingMessage
212 std::map<int, PendingMessage> in_navigation_protocol_message_buffer_; 215 std::map<int, PendingMessage> in_navigation_protocol_message_buffer_;
213 216
214 // The FrameTreeNode associated with this agent. 217 // The FrameTreeNode associated with this agent.
215 FrameTreeNode* frame_tree_node_; 218 FrameTreeNode* frame_tree_node_;
216 219
217 DISALLOW_COPY_AND_ASSIGN(RenderFrameDevToolsAgentHost); 220 DISALLOW_COPY_AND_ASSIGN(RenderFrameDevToolsAgentHost);
218 }; 221 };
219 222
220 } // namespace content 223 } // namespace content
221 224
222 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ 225 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698