| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 if (!rfh) | 320 if (!rfh) |
| 321 return nullptr; | 321 return nullptr; |
| 322 return static_cast<RenderFrameHostImpl*>(rfh)->delegate()->GetAsWebContents(); | 322 return static_cast<RenderFrameHostImpl*>(rfh)->delegate()->GetAsWebContents(); |
| 323 } | 323 } |
| 324 | 324 |
| 325 WebContents* WebContents::FromFrameTreeNodeId(int frame_tree_node_id) { | 325 WebContents* WebContents::FromFrameTreeNodeId(int frame_tree_node_id) { |
| 326 FrameTreeNode* frame_tree_node = | 326 FrameTreeNode* frame_tree_node = |
| 327 FrameTreeNode::GloballyFindByID(frame_tree_node_id); | 327 FrameTreeNode::GloballyFindByID(frame_tree_node_id); |
| 328 if (!frame_tree_node) | 328 if (!frame_tree_node) |
| 329 return nullptr; | 329 return nullptr; |
| 330 return FromRenderFrameHost(frame_tree_node->current_frame_host()); | 330 return WebContentsImpl::FromFrameTreeNode(frame_tree_node); |
| 331 } | 331 } |
| 332 | 332 |
| 333 void WebContents::SetScreenOrientationDelegate( | 333 void WebContents::SetScreenOrientationDelegate( |
| 334 ScreenOrientationDelegate* delegate) { | 334 ScreenOrientationDelegate* delegate) { |
| 335 ScreenOrientationProvider::SetDelegate(delegate); | 335 ScreenOrientationProvider::SetDelegate(delegate); |
| 336 } | 336 } |
| 337 | 337 |
| 338 // WebContentsImpl::DestructionObserver ---------------------------------------- | 338 // WebContentsImpl::DestructionObserver ---------------------------------------- |
| 339 | 339 |
| 340 class WebContentsImpl::DestructionObserver : public WebContentsObserver { | 340 class WebContentsImpl::DestructionObserver : public WebContentsObserver { |
| (...skipping 5261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5602 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | 5602 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); |
| 5603 if (!render_view_host) | 5603 if (!render_view_host) |
| 5604 continue; | 5604 continue; |
| 5605 render_view_host_set.insert(render_view_host); | 5605 render_view_host_set.insert(render_view_host); |
| 5606 } | 5606 } |
| 5607 for (RenderViewHost* render_view_host : render_view_host_set) | 5607 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5608 render_view_host->OnWebkitPreferencesChanged(); | 5608 render_view_host->OnWebkitPreferencesChanged(); |
| 5609 } | 5609 } |
| 5610 | 5610 |
| 5611 } // namespace content | 5611 } // namespace content |
| OLD | NEW |