| 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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 return frame_tree_.root()->current_frame_host(); | 757 return frame_tree_.root()->current_frame_host(); |
| 758 } | 758 } |
| 759 | 759 |
| 760 RenderFrameHostImpl* WebContentsImpl::GetFocusedFrame() { | 760 RenderFrameHostImpl* WebContentsImpl::GetFocusedFrame() { |
| 761 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); | 761 FrameTreeNode* focused_node = frame_tree_.GetFocusedFrame(); |
| 762 if (!focused_node) | 762 if (!focused_node) |
| 763 return nullptr; | 763 return nullptr; |
| 764 return focused_node->current_frame_host(); | 764 return focused_node->current_frame_host(); |
| 765 } | 765 } |
| 766 | 766 |
| 767 RenderFrameHostImpl* WebContentsImpl::FindFrameByFrameTreeNodeID( |
| 768 int frame_tree_node_id) { |
| 769 FrameTreeNode* frame = frame_tree_.FindByID(frame_tree_node_id); |
| 770 return frame ? frame->current_frame_host() : nullptr; |
| 771 } |
| 772 |
| 767 void WebContentsImpl::ForEachFrame( | 773 void WebContentsImpl::ForEachFrame( |
| 768 const base::Callback<void(RenderFrameHost*)>& on_frame) { | 774 const base::Callback<void(RenderFrameHost*)>& on_frame) { |
| 769 frame_tree_.ForEach(base::Bind(&ForEachFrameInternal, on_frame)); | 775 frame_tree_.ForEach(base::Bind(&ForEachFrameInternal, on_frame)); |
| 770 } | 776 } |
| 771 | 777 |
| 772 void WebContentsImpl::SendToAllFrames(IPC::Message* message) { | 778 void WebContentsImpl::SendToAllFrames(IPC::Message* message) { |
| 773 ForEachFrame(base::Bind(&SendToAllFramesInternal, message)); | 779 ForEachFrame(base::Bind(&SendToAllFramesInternal, message)); |
| 774 delete message; | 780 delete message; |
| 775 } | 781 } |
| 776 | 782 |
| (...skipping 3863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4640 return NULL; | 4646 return NULL; |
| 4641 } | 4647 } |
| 4642 | 4648 |
| 4643 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4649 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4644 force_disable_overscroll_content_ = force_disable; | 4650 force_disable_overscroll_content_ = force_disable; |
| 4645 if (view_) | 4651 if (view_) |
| 4646 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4652 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4647 } | 4653 } |
| 4648 | 4654 |
| 4649 } // namespace content | 4655 } // namespace content |
| OLD | NEW |