| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 } | 921 } |
| 922 | 922 |
| 923 RenderWidgetHostView* WebContentsImpl::GetTopLevelRenderWidgetHostView() { | 923 RenderWidgetHostView* WebContentsImpl::GetTopLevelRenderWidgetHostView() { |
| 924 if (GetOuterWebContents()) | 924 if (GetOuterWebContents()) |
| 925 return GetOuterWebContents()->GetTopLevelRenderWidgetHostView(); | 925 return GetOuterWebContents()->GetTopLevelRenderWidgetHostView(); |
| 926 return GetRenderManager()->GetRenderWidgetHostView(); | 926 return GetRenderManager()->GetRenderWidgetHostView(); |
| 927 } | 927 } |
| 928 | 928 |
| 929 RenderWidgetHostView* WebContentsImpl::GetFullscreenRenderWidgetHostView() | 929 RenderWidgetHostView* WebContentsImpl::GetFullscreenRenderWidgetHostView() |
| 930 const { | 930 const { |
| 931 RenderWidgetHost* const widget_host = | 931 if (auto widget_host = GetFullscreenRenderWidgetHost()) |
| 932 RenderWidgetHostImpl::FromID(fullscreen_widget_process_id_, | 932 return widget_host->GetView(); |
| 933 fullscreen_widget_routing_id_); | 933 return nullptr; |
| 934 return widget_host ? widget_host->GetView() : NULL; | |
| 935 } | 934 } |
| 936 | 935 |
| 937 WebContentsView* WebContentsImpl::GetView() const { | 936 WebContentsView* WebContentsImpl::GetView() const { |
| 938 return view_.get(); | 937 return view_.get(); |
| 939 } | 938 } |
| 940 | 939 |
| 941 SkColor WebContentsImpl::GetThemeColor() const { | 940 SkColor WebContentsImpl::GetThemeColor() const { |
| 942 return theme_color_; | 941 return theme_color_; |
| 943 } | 942 } |
| 944 | 943 |
| (...skipping 4046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4991 return capturer_count_ == 0 && !should_normally_be_visible_; | 4990 return capturer_count_ == 0 && !should_normally_be_visible_; |
| 4992 } | 4991 } |
| 4993 | 4992 |
| 4994 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { | 4993 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { |
| 4995 if (node_ && node_->outer_web_contents()) | 4994 if (node_ && node_->outer_web_contents()) |
| 4996 return node_->outer_contents_frame_tree_node_id(); | 4995 return node_->outer_contents_frame_tree_node_id(); |
| 4997 | 4996 |
| 4998 return FrameTreeNode::kFrameTreeNodeInvalidId; | 4997 return FrameTreeNode::kFrameTreeNodeInvalidId; |
| 4999 } | 4998 } |
| 5000 | 4999 |
| 5000 RenderWidgetHostImpl* WebContentsImpl::GetFullscreenRenderWidgetHost() const { |
| 5001 return RenderWidgetHostImpl::FromID(fullscreen_widget_process_id_, |
| 5002 fullscreen_widget_routing_id_); |
| 5003 } |
| 5004 |
| 5001 RenderFrameHostManager* WebContentsImpl::GetRenderManager() const { | 5005 RenderFrameHostManager* WebContentsImpl::GetRenderManager() const { |
| 5002 return frame_tree_.root()->render_manager(); | 5006 return frame_tree_.root()->render_manager(); |
| 5003 } | 5007 } |
| 5004 | 5008 |
| 5005 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { | 5009 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { |
| 5006 return browser_plugin_guest_.get(); | 5010 return browser_plugin_guest_.get(); |
| 5007 } | 5011 } |
| 5008 | 5012 |
| 5009 void WebContentsImpl::SetBrowserPluginGuest(BrowserPluginGuest* guest) { | 5013 void WebContentsImpl::SetBrowserPluginGuest(BrowserPluginGuest* guest) { |
| 5010 CHECK(!browser_plugin_guest_); | 5014 CHECK(!browser_plugin_guest_); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5181 dialog_manager_ = dialog_manager; | 5185 dialog_manager_ = dialog_manager; |
| 5182 } | 5186 } |
| 5183 | 5187 |
| 5184 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5188 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5185 auto it = binding_sets_.find(interface_name); | 5189 auto it = binding_sets_.find(interface_name); |
| 5186 if (it != binding_sets_.end()) | 5190 if (it != binding_sets_.end()) |
| 5187 binding_sets_.erase(it); | 5191 binding_sets_.erase(it); |
| 5188 } | 5192 } |
| 5189 | 5193 |
| 5190 } // namespace content | 5194 } // namespace content |
| OLD | NEW |