| 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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 return frame_tree_.root()->current_frame_host(); | 773 return frame_tree_.root()->current_frame_host(); |
| 774 } | 774 } |
| 775 | 775 |
| 776 RenderFrameHostImpl* WebContentsImpl::GetFocusedFrame() { | 776 RenderFrameHostImpl* WebContentsImpl::GetFocusedFrame() { |
| 777 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); | 777 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); |
| 778 if (!focused_node) | 778 if (!focused_node) |
| 779 return nullptr; | 779 return nullptr; |
| 780 return focused_node->current_frame_host(); | 780 return focused_node->current_frame_host(); |
| 781 } | 781 } |
| 782 | 782 |
| 783 RenderFrameHostImpl* WebContentsImpl::FindFrameByFrameTreeNodeId( |
| 784 int frame_tree_node_id) { |
| 785 FrameTreeNode* frame = frame_tree_.FindByID(frame_tree_node_id); |
| 786 return frame ? frame->current_frame_host() : nullptr; |
| 787 } |
| 788 |
| 783 void WebContentsImpl::ForEachFrame( | 789 void WebContentsImpl::ForEachFrame( |
| 784 const base::Callback<void(RenderFrameHost*)>& on_frame) { | 790 const base::Callback<void(RenderFrameHost*)>& on_frame) { |
| 785 frame_tree_.ForEach(base::Bind(&ForEachFrameInternal, on_frame)); | 791 frame_tree_.ForEach(base::Bind(&ForEachFrameInternal, on_frame)); |
| 786 } | 792 } |
| 787 | 793 |
| 788 void WebContentsImpl::SendToAllFrames(IPC::Message* message) { | 794 void WebContentsImpl::SendToAllFrames(IPC::Message* message) { |
| 789 ForEachFrame(base::Bind(&SendToAllFramesInternal, message)); | 795 ForEachFrame(base::Bind(&SendToAllFramesInternal, message)); |
| 790 delete message; | 796 delete message; |
| 791 } | 797 } |
| 792 | 798 |
| (...skipping 4047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4840 return NULL; | 4846 return NULL; |
| 4841 } | 4847 } |
| 4842 | 4848 |
| 4843 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4849 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4844 force_disable_overscroll_content_ = force_disable; | 4850 force_disable_overscroll_content_ = force_disable; |
| 4845 if (view_) | 4851 if (view_) |
| 4846 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4852 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4847 } | 4853 } |
| 4848 | 4854 |
| 4849 } // namespace content | 4855 } // namespace content |
| OLD | NEW |