Chromium Code Reviews| 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 619 RenderProcessHost* WebContentsImpl::GetRenderProcessHost() const { | 619 RenderProcessHost* WebContentsImpl::GetRenderProcessHost() const { |
| 620 RenderViewHostImpl* host = GetRenderManager()->current_host(); | 620 RenderViewHostImpl* host = GetRenderManager()->current_host(); |
| 621 return host ? host->GetProcess() : NULL; | 621 return host ? host->GetProcess() : NULL; |
| 622 } | 622 } |
| 623 | 623 |
| 624 RenderFrameHost* WebContentsImpl::GetMainFrame() { | 624 RenderFrameHost* WebContentsImpl::GetMainFrame() { |
| 625 return frame_tree_.root()->current_frame_host(); | 625 return frame_tree_.root()->current_frame_host(); |
| 626 } | 626 } |
| 627 | 627 |
| 628 RenderFrameHost* WebContentsImpl::GetFocusedFrame() { | 628 RenderFrameHost* WebContentsImpl::GetFocusedFrame() { |
| 629 if (ShowingInterstitialPage()) { | |
| 630 InterstitialPageImpl* interstitial_page = | |
| 631 (InterstitialPageImpl*)GetInterstitialPage(); | |
|
palmer
2015/04/20 23:51:58
Use a C++-style cast here.
I don't know exactly w
| |
| 632 return interstitial_page->GetFrameTree()->root()->current_frame_host(); | |
| 633 } | |
| 629 if (!frame_tree_.GetFocusedFrame()) | 634 if (!frame_tree_.GetFocusedFrame()) |
| 630 return NULL; | 635 return NULL; |
| 631 return frame_tree_.GetFocusedFrame()->current_frame_host(); | 636 return frame_tree_.GetFocusedFrame()->current_frame_host(); |
| 632 } | 637 } |
| 633 | 638 |
| 634 void WebContentsImpl::ForEachFrame( | 639 void WebContentsImpl::ForEachFrame( |
| 635 const base::Callback<void(RenderFrameHost*)>& on_frame) { | 640 const base::Callback<void(RenderFrameHost*)>& on_frame) { |
| 636 frame_tree_.ForEach(base::Bind(&ForEachFrameInternal, on_frame)); | 641 frame_tree_.ForEach(base::Bind(&ForEachFrameInternal, on_frame)); |
| 637 } | 642 } |
| 638 | 643 |
| (...skipping 3742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4381 node->render_manager()->ResumeResponseDeferredAtStart(); | 4386 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4382 } | 4387 } |
| 4383 | 4388 |
| 4384 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4389 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4385 force_disable_overscroll_content_ = force_disable; | 4390 force_disable_overscroll_content_ = force_disable; |
| 4386 if (view_) | 4391 if (view_) |
| 4387 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4392 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4388 } | 4393 } |
| 4389 | 4394 |
| 4390 } // namespace content | 4395 } // namespace content |
| OLD | NEW |