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

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

Issue 2400863002: Merge to 2840 "[DevTools] Avoid current_ and pending_ being the same host in RenderFrameDevToolsAge… (Closed)
Patch Set: 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 void OnClientDetached(); 148 void OnClientDetached();
149 149
150 void RenderFrameCrashed(); 150 void RenderFrameCrashed();
151 void OnSwapCompositorFrame(const IPC::Message& message); 151 void OnSwapCompositorFrame(const IPC::Message& message);
152 void OnDispatchOnInspectorFrontend( 152 void OnDispatchOnInspectorFrontend(
153 RenderFrameHost* sender, 153 RenderFrameHost* sender,
154 const DevToolsMessageChunk& message); 154 const DevToolsMessageChunk& message);
155 void OnRequestNewWindow(RenderFrameHost* sender, int new_routing_id); 155 void OnRequestNewWindow(RenderFrameHost* sender, int new_routing_id);
156 void DestroyOnRenderFrameGone(); 156 void DestroyOnRenderFrameGone();
157 157
158 bool CheckConsistency();
159
158 void CreatePowerSaveBlocker(); 160 void CreatePowerSaveBlocker();
159 161
160 class FrameHostHolder; 162 class FrameHostHolder;
161 163
162 std::unique_ptr<FrameHostHolder> current_; 164 std::unique_ptr<FrameHostHolder> current_;
163 std::unique_ptr<FrameHostHolder> pending_; 165 std::unique_ptr<FrameHostHolder> pending_;
164 166
165 // Stores per-host state between DisconnectWebContents and ConnectWebContents. 167 // Stores per-host state between DisconnectWebContents and ConnectWebContents.
166 std::unique_ptr<FrameHostHolder> disconnected_; 168 std::unique_ptr<FrameHostHolder> disconnected_;
167 169
(...skipping 11 matching lines...) Expand all
179 std::unique_ptr<devtools::storage::StorageHandler> 181 std::unique_ptr<devtools::storage::StorageHandler>
180 storage_handler_; 182 storage_handler_;
181 std::unique_ptr<devtools::tracing::TracingHandler> tracing_handler_; 183 std::unique_ptr<devtools::tracing::TracingHandler> tracing_handler_;
182 std::unique_ptr<devtools::emulation::EmulationHandler> emulation_handler_; 184 std::unique_ptr<devtools::emulation::EmulationHandler> emulation_handler_;
183 std::unique_ptr<DevToolsFrameTraceRecorder> frame_trace_recorder_; 185 std::unique_ptr<DevToolsFrameTraceRecorder> frame_trace_recorder_;
184 #if defined(OS_ANDROID) 186 #if defined(OS_ANDROID)
185 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; 187 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
186 std::unique_ptr<base::WeakPtrFactory<ui::ViewAndroid>> view_weak_factory_; 188 std::unique_ptr<base::WeakPtrFactory<ui::ViewAndroid>> view_weak_factory_;
187 #endif 189 #endif
188 std::unique_ptr<DevToolsProtocolHandler> protocol_handler_; 190 std::unique_ptr<DevToolsProtocolHandler> protocol_handler_;
191 RenderFrameHostImpl* handlers_frame_host_;
189 bool current_frame_crashed_; 192 bool current_frame_crashed_;
190 193
191 // PlzNavigate 194 // PlzNavigate
192 195
193 // Handle that caused the setting of pending_. 196 // Handle that caused the setting of pending_.
194 NavigationHandle* pending_handle_; 197 NavigationHandle* pending_handle_;
195 198
196 // List of handles currently navigating. 199 // List of handles currently navigating.
197 std::set<NavigationHandle*> navigating_handles_; 200 std::set<NavigationHandle*> navigating_handles_;
198 201
199 struct PendingMessage { 202 struct PendingMessage {
200 int session_id; 203 int session_id;
201 std::string method; 204 std::string method;
202 std::string message; 205 std::string message;
203 }; 206 };
204 // <call_id> -> PendingMessage 207 // <call_id> -> PendingMessage
205 std::map<int, PendingMessage> in_navigation_protocol_message_buffer_; 208 std::map<int, PendingMessage> in_navigation_protocol_message_buffer_;
206 209
207 // The FrameTreeNode associated with this agent. 210 // The FrameTreeNode associated with this agent.
208 FrameTreeNode* frame_tree_node_; 211 FrameTreeNode* frame_tree_node_;
209 212
210 DISALLOW_COPY_AND_ASSIGN(RenderFrameDevToolsAgentHost); 213 DISALLOW_COPY_AND_ASSIGN(RenderFrameDevToolsAgentHost);
211 }; 214 };
212 215
213 } // namespace content 216 } // namespace content
214 217
215 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ 218 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698