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

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

Issue 2253383002: [DevTools] Schema domain implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: schema Created 4 years, 4 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 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 5 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
6 6
7 #include <tuple> 7 #include <tuple>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "content/browser/bad_message.h" 13 #include "content/browser/bad_message.h"
14 #include "content/browser/child_process_security_policy_impl.h" 14 #include "content/browser/child_process_security_policy_impl.h"
15 #include "content/browser/devtools/devtools_frame_trace_recorder.h" 15 #include "content/browser/devtools/devtools_frame_trace_recorder.h"
16 #include "content/browser/devtools/devtools_protocol_handler.h" 16 #include "content/browser/devtools/devtools_protocol_handler.h"
17 #include "content/browser/devtools/page_navigation_throttle.h" 17 #include "content/browser/devtools/page_navigation_throttle.h"
18 #include "content/browser/devtools/protocol/browser_handler.h" 18 #include "content/browser/devtools/protocol/browser_handler.h"
19 #include "content/browser/devtools/protocol/dom_handler.h" 19 #include "content/browser/devtools/protocol/dom_handler.h"
20 #include "content/browser/devtools/protocol/emulation_handler.h" 20 #include "content/browser/devtools/protocol/emulation_handler.h"
21 #include "content/browser/devtools/protocol/input_handler.h" 21 #include "content/browser/devtools/protocol/input_handler.h"
22 #include "content/browser/devtools/protocol/inspector_handler.h" 22 #include "content/browser/devtools/protocol/inspector_handler.h"
23 #include "content/browser/devtools/protocol/io_handler.h" 23 #include "content/browser/devtools/protocol/io_handler.h"
24 #include "content/browser/devtools/protocol/network_handler.h" 24 #include "content/browser/devtools/protocol/network_handler.h"
25 #include "content/browser/devtools/protocol/page_handler.h" 25 #include "content/browser/devtools/protocol/page_handler.h"
26 #include "content/browser/devtools/protocol/schema_handler.h"
26 #include "content/browser/devtools/protocol/security_handler.h" 27 #include "content/browser/devtools/protocol/security_handler.h"
27 #include "content/browser/devtools/protocol/service_worker_handler.h" 28 #include "content/browser/devtools/protocol/service_worker_handler.h"
28 #include "content/browser/devtools/protocol/storage_handler.h" 29 #include "content/browser/devtools/protocol/storage_handler.h"
29 #include "content/browser/devtools/protocol/tracing_handler.h" 30 #include "content/browser/devtools/protocol/tracing_handler.h"
30 #include "content/browser/frame_host/navigation_handle_impl.h" 31 #include "content/browser/frame_host/navigation_handle_impl.h"
31 #include "content/browser/frame_host/render_frame_host_impl.h" 32 #include "content/browser/frame_host/render_frame_host_impl.h"
32 #include "content/browser/renderer_host/input/input_router_impl.h" 33 #include "content/browser/renderer_host/input/input_router_impl.h"
33 #include "content/browser/renderer_host/render_process_host_impl.h" 34 #include "content/browser/renderer_host/render_process_host_impl.h"
34 #include "content/browser/renderer_host/render_view_host_impl.h" 35 #include "content/browser/renderer_host/render_view_host_impl.h"
35 #include "content/browser/site_instance_impl.h" 36 #include "content/browser/site_instance_impl.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 370
370 RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost( 371 RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost(
371 RenderFrameHostImpl* host) 372 RenderFrameHostImpl* host)
372 : browser_handler_(new devtools::browser::BrowserHandler()), 373 : browser_handler_(new devtools::browser::BrowserHandler()),
373 dom_handler_(new devtools::dom::DOMHandler()), 374 dom_handler_(new devtools::dom::DOMHandler()),
374 input_handler_(new devtools::input::InputHandler()), 375 input_handler_(new devtools::input::InputHandler()),
375 inspector_handler_(new devtools::inspector::InspectorHandler()), 376 inspector_handler_(new devtools::inspector::InspectorHandler()),
376 io_handler_(new devtools::io::IOHandler(GetIOContext())), 377 io_handler_(new devtools::io::IOHandler(GetIOContext())),
377 network_handler_(new devtools::network::NetworkHandler()), 378 network_handler_(new devtools::network::NetworkHandler()),
378 page_handler_(nullptr), 379 page_handler_(nullptr),
380 schema_handler_(new devtools::schema::SchemaHandler()),
379 security_handler_(nullptr), 381 security_handler_(nullptr),
380 service_worker_handler_( 382 service_worker_handler_(
381 new devtools::service_worker::ServiceWorkerHandler()), 383 new devtools::service_worker::ServiceWorkerHandler()),
382 storage_handler_(new devtools::storage::StorageHandler()), 384 storage_handler_(new devtools::storage::StorageHandler()),
383 tracing_handler_(new devtools::tracing::TracingHandler( 385 tracing_handler_(new devtools::tracing::TracingHandler(
384 devtools::tracing::TracingHandler::Renderer, 386 devtools::tracing::TracingHandler::Renderer,
385 host->GetFrameTreeNodeId(), 387 host->GetFrameTreeNodeId(),
386 GetIOContext())), 388 GetIOContext())),
387 emulation_handler_(nullptr), 389 emulation_handler_(nullptr),
388 frame_trace_recorder_(nullptr), 390 frame_trace_recorder_(nullptr),
389 protocol_handler_(new DevToolsProtocolHandler(this)), 391 protocol_handler_(new DevToolsProtocolHandler(this)),
390 current_frame_crashed_(false), 392 current_frame_crashed_(false),
391 pending_handle_(nullptr), 393 pending_handle_(nullptr),
392 frame_tree_node_(host->frame_tree_node()) { 394 frame_tree_node_(host->frame_tree_node()) {
393 DevToolsProtocolDispatcher* dispatcher = protocol_handler_->dispatcher(); 395 DevToolsProtocolDispatcher* dispatcher = protocol_handler_->dispatcher();
394 dispatcher->SetBrowserHandler(browser_handler_.get()); 396 dispatcher->SetBrowserHandler(browser_handler_.get());
395 dispatcher->SetDOMHandler(dom_handler_.get()); 397 dispatcher->SetDOMHandler(dom_handler_.get());
396 dispatcher->SetInputHandler(input_handler_.get()); 398 dispatcher->SetInputHandler(input_handler_.get());
397 dispatcher->SetInspectorHandler(inspector_handler_.get()); 399 dispatcher->SetInspectorHandler(inspector_handler_.get());
398 dispatcher->SetIOHandler(io_handler_.get()); 400 dispatcher->SetIOHandler(io_handler_.get());
399 dispatcher->SetNetworkHandler(network_handler_.get()); 401 dispatcher->SetNetworkHandler(network_handler_.get());
402 dispatcher->SetSchemaHandler(schema_handler_.get());
400 dispatcher->SetServiceWorkerHandler(service_worker_handler_.get()); 403 dispatcher->SetServiceWorkerHandler(service_worker_handler_.get());
401 dispatcher->SetStorageHandler(storage_handler_.get()); 404 dispatcher->SetStorageHandler(storage_handler_.get());
402 dispatcher->SetTracingHandler(tracing_handler_.get()); 405 dispatcher->SetTracingHandler(tracing_handler_.get());
403 406
404 if (!host->GetParent()) { 407 if (!host->GetParent()) {
405 security_handler_.reset(new devtools::security::SecurityHandler()); 408 security_handler_.reset(new devtools::security::SecurityHandler());
406 page_handler_.reset(new devtools::page::PageHandler()); 409 page_handler_.reset(new devtools::page::PageHandler());
407 emulation_handler_.reset( 410 emulation_handler_.reset(
408 new devtools::emulation::EmulationHandler()); 411 new devtools::emulation::EmulationHandler());
409 dispatcher->SetSecurityHandler(security_handler_.get()); 412 dispatcher->SetSecurityHandler(security_handler_.get());
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 RenderFrameHost* host) { 967 RenderFrameHost* host) {
965 return (current_ && current_->host() == host) || 968 return (current_ && current_->host() == host) ||
966 (pending_ && pending_->host() == host); 969 (pending_ && pending_->host() == host);
967 } 970 }
968 971
969 bool RenderFrameDevToolsAgentHost::IsChildFrame() { 972 bool RenderFrameDevToolsAgentHost::IsChildFrame() {
970 return current_ && current_->host()->GetParent(); 973 return current_ && current_->host()->GetParent();
971 } 974 }
972 975
973 } // namespace content 976 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.h ('k') | content/browser/devtools/worker_devtools_agent_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698