| OLD | NEW |
| 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/guid.h" | 10 #include "base/guid.h" |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 // static | 383 // static |
| 384 void RenderFrameDevToolsAgentHost::WebContentsCreated( | 384 void RenderFrameDevToolsAgentHost::WebContentsCreated( |
| 385 WebContents* web_contents) { | 385 WebContents* web_contents) { |
| 386 if (ShouldForceCreation()) { | 386 if (ShouldForceCreation()) { |
| 387 // Force agent host. | 387 // Force agent host. |
| 388 DevToolsAgentHost::GetOrCreateFor(web_contents); | 388 DevToolsAgentHost::GetOrCreateFor(web_contents); |
| 389 } | 389 } |
| 390 } | 390 } |
| 391 | 391 |
| 392 // static |
| 393 bool RenderFrameDevToolsAgentHost::HasFor(RenderFrameHost* frame_host) { |
| 394 return FindAgentHost(frame_host) != NULL; |
| 395 } |
| 396 |
| 392 RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost( | 397 RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost( |
| 393 RenderFrameHostImpl* host) | 398 RenderFrameHostImpl* host) |
| 394 : DevToolsAgentHostImpl(base::GenerateGUID()), | 399 : DevToolsAgentHostImpl(base::GenerateGUID()), |
| 395 dom_handler_(new devtools::dom::DOMHandler()), | 400 dom_handler_(new devtools::dom::DOMHandler()), |
| 396 input_handler_(new devtools::input::InputHandler()), | 401 input_handler_(new devtools::input::InputHandler()), |
| 397 inspector_handler_(new devtools::inspector::InspectorHandler()), | 402 inspector_handler_(new devtools::inspector::InspectorHandler()), |
| 398 io_handler_(new devtools::io::IOHandler(GetIOContext())), | 403 io_handler_(new devtools::io::IOHandler(GetIOContext())), |
| 399 network_handler_(new devtools::network::NetworkHandler()), | 404 network_handler_(new devtools::network::NetworkHandler()), |
| 400 page_handler_(nullptr), | 405 page_handler_(nullptr), |
| 401 schema_handler_(new devtools::schema::SchemaHandler()), | 406 schema_handler_(new devtools::schema::SchemaHandler()), |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 RenderFrameHost* host) { | 1106 RenderFrameHost* host) { |
| 1102 return (current_ && current_->host() == host) || | 1107 return (current_ && current_->host() == host) || |
| 1103 (pending_ && pending_->host() == host); | 1108 (pending_ && pending_->host() == host); |
| 1104 } | 1109 } |
| 1105 | 1110 |
| 1106 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 1111 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
| 1107 return current_ && current_->host()->GetParent(); | 1112 return current_ && current_->host()->GetParent(); |
| 1108 } | 1113 } |
| 1109 | 1114 |
| 1110 } // namespace content | 1115 } // namespace content |
| OLD | NEW |