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

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

Issue 2500093002: [DevTools] Move IO and Tracing to new generator. (Closed)
Patch Set: works Created 4 years, 1 month 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
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "content/browser/devtools/devtools_agent_host_impl.h" 14 #include "content/browser/devtools/devtools_agent_host_impl.h"
15 #include "content/browser/devtools/protocol/forward.h"
15 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
16 #include "content/public/browser/web_contents_observer.h" 17 #include "content/public/browser/web_contents_observer.h"
17 18
18 #if defined(OS_ANDROID) 19 #if defined(OS_ANDROID)
19 #include "ui/android/view_android.h" 20 #include "ui/android/view_android.h"
20 #endif // OS_ANDROID 21 #endif // OS_ANDROID
21 22
22 namespace cc { 23 namespace cc {
23 class CompositorFrameMetadata; 24 class CompositorFrameMetadata;
24 } 25 }
(...skipping 12 matching lines...) Expand all
37 class FrameTreeNode; 38 class FrameTreeNode;
38 class NavigationHandle; 39 class NavigationHandle;
39 class NavigationThrottle; 40 class NavigationThrottle;
40 class RenderFrameHostImpl; 41 class RenderFrameHostImpl;
41 42
42 namespace devtools { 43 namespace devtools {
43 namespace dom { class DOMHandler; } 44 namespace dom { class DOMHandler; }
44 namespace emulation { class EmulationHandler; } 45 namespace emulation { class EmulationHandler; }
45 namespace input { class InputHandler; } 46 namespace input { class InputHandler; }
46 namespace inspector { class InspectorHandler; } 47 namespace inspector { class InspectorHandler; }
47 namespace io { class IOHandler; }
48 namespace network { class NetworkHandler; } 48 namespace network { class NetworkHandler; }
49 namespace page { class PageHandler; } 49 namespace page { class PageHandler; }
50 namespace schema { class SchemaHandler; } 50 namespace schema { class SchemaHandler; }
51 namespace security { class SecurityHandler; } 51 namespace security { class SecurityHandler; }
52 namespace service_worker { class ServiceWorkerHandler; } 52 namespace service_worker { class ServiceWorkerHandler; }
53 namespace storage { class StorageHandler; } 53 namespace storage { class StorageHandler; }
54 namespace target { class TargetHandler; } 54 namespace target { class TargetHandler; }
55 namespace tracing { class TracingHandler; }
56 } 55 }
57 56
57 namespace protocol {
58 class IOHandler;
59 class TracingHandler;
60 } // namespace protocol
61
58 class CONTENT_EXPORT RenderFrameDevToolsAgentHost 62 class CONTENT_EXPORT RenderFrameDevToolsAgentHost
59 : public DevToolsAgentHostImpl, 63 : public DevToolsAgentHostImpl,
60 private WebContentsObserver { 64 private WebContentsObserver {
61 public: 65 public:
62 static void AddAllAgentHosts(DevToolsAgentHost::List* result); 66 static void AddAllAgentHosts(DevToolsAgentHost::List* result);
63 67
64 static void OnCancelPendingNavigation(RenderFrameHost* pending, 68 static void OnCancelPendingNavigation(RenderFrameHost* pending,
65 RenderFrameHost* current); 69 RenderFrameHost* current);
66 static void OnBeforeNavigation(RenderFrameHost* current, 70 static void OnBeforeNavigation(RenderFrameHost* current,
67 RenderFrameHost* pending); 71 RenderFrameHost* pending);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 180
177 std::unique_ptr<FrameHostHolder> current_; 181 std::unique_ptr<FrameHostHolder> current_;
178 std::unique_ptr<FrameHostHolder> pending_; 182 std::unique_ptr<FrameHostHolder> pending_;
179 183
180 // Stores per-host state between DisconnectWebContents and ConnectWebContents. 184 // Stores per-host state between DisconnectWebContents and ConnectWebContents.
181 std::unique_ptr<FrameHostHolder> disconnected_; 185 std::unique_ptr<FrameHostHolder> disconnected_;
182 186
183 std::unique_ptr<devtools::dom::DOMHandler> dom_handler_; 187 std::unique_ptr<devtools::dom::DOMHandler> dom_handler_;
184 std::unique_ptr<devtools::input::InputHandler> input_handler_; 188 std::unique_ptr<devtools::input::InputHandler> input_handler_;
185 std::unique_ptr<devtools::inspector::InspectorHandler> inspector_handler_; 189 std::unique_ptr<devtools::inspector::InspectorHandler> inspector_handler_;
186 std::unique_ptr<devtools::io::IOHandler> io_handler_; 190 std::unique_ptr<protocol::IOHandler> io_handler_;
187 std::unique_ptr<devtools::network::NetworkHandler> network_handler_; 191 std::unique_ptr<devtools::network::NetworkHandler> network_handler_;
188 std::unique_ptr<devtools::page::PageHandler> page_handler_; 192 std::unique_ptr<devtools::page::PageHandler> page_handler_;
189 std::unique_ptr<devtools::schema::SchemaHandler> schema_handler_; 193 std::unique_ptr<devtools::schema::SchemaHandler> schema_handler_;
190 std::unique_ptr<devtools::security::SecurityHandler> security_handler_; 194 std::unique_ptr<devtools::security::SecurityHandler> security_handler_;
191 std::unique_ptr<devtools::service_worker::ServiceWorkerHandler> 195 std::unique_ptr<devtools::service_worker::ServiceWorkerHandler>
192 service_worker_handler_; 196 service_worker_handler_;
193 std::unique_ptr<devtools::storage::StorageHandler> 197 std::unique_ptr<devtools::storage::StorageHandler>
194 storage_handler_; 198 storage_handler_;
195 std::unique_ptr<devtools::target::TargetHandler> target_handler_; 199 std::unique_ptr<devtools::target::TargetHandler> target_handler_;
196 std::unique_ptr<devtools::tracing::TracingHandler> tracing_handler_; 200 std::unique_ptr<protocol::TracingHandler> tracing_handler_;
197 std::unique_ptr<devtools::emulation::EmulationHandler> emulation_handler_; 201 std::unique_ptr<devtools::emulation::EmulationHandler> emulation_handler_;
198 std::unique_ptr<DevToolsFrameTraceRecorder> frame_trace_recorder_; 202 std::unique_ptr<DevToolsFrameTraceRecorder> frame_trace_recorder_;
199 #if defined(OS_ANDROID) 203 #if defined(OS_ANDROID)
200 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; 204 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
201 #endif 205 #endif
202 std::unique_ptr<DevToolsProtocolHandler> protocol_handler_; 206 std::unique_ptr<DevToolsProtocolHandler> protocol_handler_;
207 std::unique_ptr<protocol::UberDispatcher> protocol_dispatcher_;
203 RenderFrameHostImpl* handlers_frame_host_; 208 RenderFrameHostImpl* handlers_frame_host_;
204 bool current_frame_crashed_; 209 bool current_frame_crashed_;
205 210
206 // PlzNavigate 211 // PlzNavigate
207 212
208 // Handle that caused the setting of pending_. 213 // Handle that caused the setting of pending_.
209 NavigationHandle* pending_handle_; 214 NavigationHandle* pending_handle_;
210 215
211 // List of handles currently navigating. 216 // List of handles currently navigating.
212 std::set<NavigationHandle*> navigating_handles_; 217 std::set<NavigationHandle*> navigating_handles_;
213 218
214 struct PendingMessage { 219 struct PendingMessage {
215 int session_id; 220 int session_id;
216 std::string method; 221 std::string method;
217 std::string message; 222 std::string message;
218 }; 223 };
219 // <call_id> -> PendingMessage 224 // <call_id> -> PendingMessage
220 std::map<int, PendingMessage> in_navigation_protocol_message_buffer_; 225 std::map<int, PendingMessage> in_navigation_protocol_message_buffer_;
221 226
222 // The FrameTreeNode associated with this agent. 227 // The FrameTreeNode associated with this agent.
223 FrameTreeNode* frame_tree_node_; 228 FrameTreeNode* frame_tree_node_;
224 229
225 DISALLOW_COPY_AND_ASSIGN(RenderFrameDevToolsAgentHost); 230 DISALLOW_COPY_AND_ASSIGN(RenderFrameDevToolsAgentHost);
226 }; 231 };
227 232
228 } // namespace content 233 } // namespace content
229 234
230 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_ 235 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_FRAME_DEVTOOLS_AGENT_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698