| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/frame_host/frame_tree_node.h" | 5 #include "content/browser/frame_host/frame_tree_node.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 void FrameTreeNode::SetOpener(FrameTreeNode* opener) { | 192 void FrameTreeNode::SetOpener(FrameTreeNode* opener) { |
| 193 if (opener_) { | 193 if (opener_) { |
| 194 opener_->RemoveObserver(opener_observer_.get()); | 194 opener_->RemoveObserver(opener_observer_.get()); |
| 195 opener_observer_.reset(); | 195 opener_observer_.reset(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 opener_ = opener; | 198 opener_ = opener; |
| 199 | 199 |
| 200 if (opener_) { | 200 if (opener_) { |
| 201 if (!opener_observer_) | 201 if (!opener_observer_) |
| 202 opener_observer_ = base::WrapUnique(new OpenerDestroyedObserver(this)); | 202 opener_observer_ = base::MakeUnique<OpenerDestroyedObserver>(this); |
| 203 opener_->AddObserver(opener_observer_.get()); | 203 opener_->AddObserver(opener_observer_.get()); |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 | 206 |
| 207 void FrameTreeNode::SetCurrentURL(const GURL& url) { | 207 void FrameTreeNode::SetCurrentURL(const GURL& url) { |
| 208 if (!has_committed_real_load_ && url != GURL(url::kAboutBlankURL)) | 208 if (!has_committed_real_load_ && url != GURL(url::kAboutBlankURL)) |
| 209 has_committed_real_load_ = true; | 209 has_committed_real_load_ = true; |
| 210 current_frame_host()->set_last_committed_url(url); | 210 current_frame_host()->set_last_committed_url(url); |
| 211 blame_context_.TakeSnapshot(); | 211 blame_context_.TakeSnapshot(); |
| 212 } | 212 } |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 } | 494 } |
| 495 return parent_->child_at(i + relative_offset); | 495 return parent_->child_at(i + relative_offset); |
| 496 } | 496 } |
| 497 } | 497 } |
| 498 | 498 |
| 499 NOTREACHED() << "FrameTreeNode not found in its parent's children."; | 499 NOTREACHED() << "FrameTreeNode not found in its parent's children."; |
| 500 return nullptr; | 500 return nullptr; |
| 501 } | 501 } |
| 502 | 502 |
| 503 } // namespace content | 503 } // namespace content |
| OLD | NEW |