| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 identifier(identifier) { | 312 identifier(identifier) { |
| 313 } | 313 } |
| 314 | 314 |
| 315 WebContentsImpl::ColorChooserInfo::~ColorChooserInfo() { | 315 WebContentsImpl::ColorChooserInfo::~ColorChooserInfo() { |
| 316 } | 316 } |
| 317 | 317 |
| 318 // WebContentsImpl::WebContentsTreeNode ---------------------------------------- | 318 // WebContentsImpl::WebContentsTreeNode ---------------------------------------- |
| 319 WebContentsImpl::WebContentsTreeNode::WebContentsTreeNode() | 319 WebContentsImpl::WebContentsTreeNode::WebContentsTreeNode() |
| 320 : outer_web_contents_(nullptr), | 320 : outer_web_contents_(nullptr), |
| 321 outer_contents_frame_tree_node_id_( | 321 outer_contents_frame_tree_node_id_( |
| 322 FrameTreeNode::kFrameTreeNodeInvalidID) { | 322 FrameTreeNode::kFrameTreeNodeInvalidId) { |
| 323 } | 323 } |
| 324 | 324 |
| 325 WebContentsImpl::WebContentsTreeNode::~WebContentsTreeNode() { | 325 WebContentsImpl::WebContentsTreeNode::~WebContentsTreeNode() { |
| 326 // Remove child pointer from our parent. | 326 // Remove child pointer from our parent. |
| 327 if (outer_web_contents_) { | 327 if (outer_web_contents_) { |
| 328 ChildrenSet& child_ptrs_in_parent = | 328 ChildrenSet& child_ptrs_in_parent = |
| 329 outer_web_contents_->node_->inner_web_contents_tree_nodes_; | 329 outer_web_contents_->node_->inner_web_contents_tree_nodes_; |
| 330 ChildrenSet::iterator iter = child_ptrs_in_parent.find(this); | 330 ChildrenSet::iterator iter = child_ptrs_in_parent.find(this); |
| 331 DCHECK(iter != child_ptrs_in_parent.end()); | 331 DCHECK(iter != child_ptrs_in_parent.end()); |
| 332 child_ptrs_in_parent.erase(this); | 332 child_ptrs_in_parent.erase(this); |
| (...skipping 4282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4615 } | 4615 } |
| 4616 | 4616 |
| 4617 bool WebContentsImpl::IsHidden() { | 4617 bool WebContentsImpl::IsHidden() { |
| 4618 return capturer_count_ == 0 && !should_normally_be_visible_; | 4618 return capturer_count_ == 0 && !should_normally_be_visible_; |
| 4619 } | 4619 } |
| 4620 | 4620 |
| 4621 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { | 4621 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { |
| 4622 if (node_ && node_->outer_web_contents()) | 4622 if (node_ && node_->outer_web_contents()) |
| 4623 return node_->outer_contents_frame_tree_node_id(); | 4623 return node_->outer_contents_frame_tree_node_id(); |
| 4624 | 4624 |
| 4625 return FrameTreeNode::kFrameTreeNodeInvalidID; | 4625 return FrameTreeNode::kFrameTreeNodeInvalidId; |
| 4626 } | 4626 } |
| 4627 | 4627 |
| 4628 RenderFrameHostManager* WebContentsImpl::GetRenderManager() const { | 4628 RenderFrameHostManager* WebContentsImpl::GetRenderManager() const { |
| 4629 return frame_tree_.root()->render_manager(); | 4629 return frame_tree_.root()->render_manager(); |
| 4630 } | 4630 } |
| 4631 | 4631 |
| 4632 WebContentsImpl* WebContentsImpl::GetOuterWebContents() { | 4632 WebContentsImpl* WebContentsImpl::GetOuterWebContents() { |
| 4633 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) { | 4633 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) { |
| 4634 if (node_) | 4634 if (node_) |
| 4635 return node_->outer_web_contents(); | 4635 return node_->outer_web_contents(); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4707 const WebContentsObserver::MediaPlayerId& id) { | 4707 const WebContentsObserver::MediaPlayerId& id) { |
| 4708 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4708 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
| 4709 } | 4709 } |
| 4710 | 4710 |
| 4711 void WebContentsImpl::MediaStoppedPlaying( | 4711 void WebContentsImpl::MediaStoppedPlaying( |
| 4712 const WebContentsObserver::MediaPlayerId& id) { | 4712 const WebContentsObserver::MediaPlayerId& id) { |
| 4713 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4713 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
| 4714 } | 4714 } |
| 4715 | 4715 |
| 4716 } // namespace content | 4716 } // namespace content |
| OLD | NEW |