| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 | 457 |
| 458 bool RenderFrameDevToolsAgentHost::Activate() { | 458 bool RenderFrameDevToolsAgentHost::Activate() { |
| 459 if (render_frame_host_) { | 459 if (render_frame_host_) { |
| 460 render_frame_host_->GetRenderViewHost()->GetDelegate()->Activate(); | 460 render_frame_host_->GetRenderViewHost()->GetDelegate()->Activate(); |
| 461 return true; | 461 return true; |
| 462 } | 462 } |
| 463 return false; | 463 return false; |
| 464 } | 464 } |
| 465 | 465 |
| 466 bool RenderFrameDevToolsAgentHost::Close() { | 466 bool RenderFrameDevToolsAgentHost::Close() { |
| 467 if (render_frame_host_) { | 467 if (web_contents()) { |
| 468 render_frame_host_->GetRenderViewHost()->ClosePage(); | 468 web_contents()->ClosePage(); |
| 469 return true; | 469 return true; |
| 470 } | 470 } |
| 471 return false; | 471 return false; |
| 472 } | 472 } |
| 473 | 473 |
| 474 void RenderFrameDevToolsAgentHost::ConnectRenderFrameHost( | 474 void RenderFrameDevToolsAgentHost::ConnectRenderFrameHost( |
| 475 RenderFrameHost* rfh) { | 475 RenderFrameHost* rfh) { |
| 476 SetRenderFrameHost(rfh); | 476 SetRenderFrameHost(rfh); |
| 477 if (IsAttached()) | 477 if (IsAttached()) |
| 478 Reattach(); | 478 Reattach(); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 if (!IsAttached() || !render_frame_host_) | 522 if (!IsAttached() || !render_frame_host_) |
| 523 return; | 523 return; |
| 524 ProcessChunkedMessageFromAgent(message); | 524 ProcessChunkedMessageFromAgent(message); |
| 525 } | 525 } |
| 526 | 526 |
| 527 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 527 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
| 528 return render_frame_host_ && render_frame_host_->GetParent(); | 528 return render_frame_host_ && render_frame_host_->GetParent(); |
| 529 } | 529 } |
| 530 | 530 |
| 531 } // namespace content | 531 } // namespace content |
| OLD | NEW |