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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
467 bool RenderFrameDevToolsAgentHost::Activate() { | 467 bool RenderFrameDevToolsAgentHost::Activate() { |
468 if (render_frame_host_) { | 468 if (render_frame_host_) { |
469 render_frame_host_->GetRenderViewHost()->GetDelegate()->Activate(); | 469 render_frame_host_->GetRenderViewHost()->GetDelegate()->Activate(); |
470 return true; | 470 return true; |
471 } | 471 } |
472 return false; | 472 return false; |
473 } | 473 } |
474 | 474 |
475 bool RenderFrameDevToolsAgentHost::Close() { | 475 bool RenderFrameDevToolsAgentHost::Close() { |
476 if (render_frame_host_) { | 476 if (render_frame_host_) { |
477 render_frame_host_->GetRenderViewHost()->ClosePage(); | 477 WebContentsImpl::FromRenderFrameHost(render_frame_host_)->ClosePage(); |
dgozman
2015/04/21 05:13:32
if (web_contents())
web_contents()->ClosePage();
nasko
2015/04/29 17:09:27
That looks fine to me. What I found strange is few
dgozman
2015/04/29 17:23:42
web_contents() is a protected method of WCO, and w
| |
478 return true; | 478 return true; |
479 } | 479 } |
480 return false; | 480 return false; |
481 } | 481 } |
482 | 482 |
483 void RenderFrameDevToolsAgentHost::ConnectRenderFrameHost( | 483 void RenderFrameDevToolsAgentHost::ConnectRenderFrameHost( |
484 RenderFrameHost* rfh) { | 484 RenderFrameHost* rfh) { |
485 SetRenderFrameHost(rfh); | 485 SetRenderFrameHost(rfh); |
486 if (IsAttached()) | 486 if (IsAttached()) |
487 Reattach(); | 487 Reattach(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
527 if (!IsAttached() || !render_frame_host_) | 527 if (!IsAttached() || !render_frame_host_) |
528 return; | 528 return; |
529 ProcessChunkedMessageFromAgent(message); | 529 ProcessChunkedMessageFromAgent(message); |
530 } | 530 } |
531 | 531 |
532 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 532 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
533 return render_frame_host_ && render_frame_host_->GetParent(); | 533 return render_frame_host_ && render_frame_host_->GetParent(); |
534 } | 534 } |
535 | 535 |
536 } // namespace content | 536 } // namespace content |
OLD | NEW |