| 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 4063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5008 return capturer_count_ == 0 && !should_normally_be_visible_; | 5007 return capturer_count_ == 0 && !should_normally_be_visible_; |
| 5009 } | 5008 } |
| 5010 | 5009 |
| 5011 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { | 5010 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { |
| 5012 if (node_ && node_->outer_web_contents()) | 5011 if (node_ && node_->outer_web_contents()) |
| 5013 return node_->outer_contents_frame_tree_node_id(); | 5012 return node_->outer_contents_frame_tree_node_id(); |
| 5014 | 5013 |
| 5015 return FrameTreeNode::kFrameTreeNodeInvalidId; | 5014 return FrameTreeNode::kFrameTreeNodeInvalidId; |
| 5016 } | 5015 } |
| 5017 | 5016 |
| 5017 RenderWidgetHostImpl* WebContentsImpl::GetFullscreenRenderWidgetHost() const { |
| 5018 return RenderWidgetHostImpl::FromID(fullscreen_widget_process_id_, |
| 5019 fullscreen_widget_routing_id_); |
| 5020 } |
| 5021 |
| 5018 RenderFrameHostManager* WebContentsImpl::GetRenderManager() const { | 5022 RenderFrameHostManager* WebContentsImpl::GetRenderManager() const { |
| 5019 return frame_tree_.root()->render_manager(); | 5023 return frame_tree_.root()->render_manager(); |
| 5020 } | 5024 } |
| 5021 | 5025 |
| 5022 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { | 5026 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { |
| 5023 return browser_plugin_guest_.get(); | 5027 return browser_plugin_guest_.get(); |
| 5024 } | 5028 } |
| 5025 | 5029 |
| 5026 void WebContentsImpl::SetBrowserPluginGuest(BrowserPluginGuest* guest) { | 5030 void WebContentsImpl::SetBrowserPluginGuest(BrowserPluginGuest* guest) { |
| 5027 CHECK(!browser_plugin_guest_); | 5031 CHECK(!browser_plugin_guest_); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5198 dialog_manager_ = dialog_manager; | 5202 dialog_manager_ = dialog_manager; |
| 5199 } | 5203 } |
| 5200 | 5204 |
| 5201 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5205 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5202 auto it = binding_sets_.find(interface_name); | 5206 auto it = binding_sets_.find(interface_name); |
| 5203 if (it != binding_sets_.end()) | 5207 if (it != binding_sets_.end()) |
| 5204 binding_sets_.erase(it); | 5208 binding_sets_.erase(it); |
| 5205 } | 5209 } |
| 5206 | 5210 |
| 5207 } // namespace content | 5211 } // namespace content |
| OLD | NEW |