Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: content/browser/frame_host/frame_tree_node.cc

Issue 2778113003: Fix popunders spawned from a subframe. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 if (opener_) { 221 if (opener_) {
222 if (!opener_observer_) 222 if (!opener_observer_)
223 opener_observer_ = base::MakeUnique<OpenerDestroyedObserver>(this, false); 223 opener_observer_ = base::MakeUnique<OpenerDestroyedObserver>(this, false);
224 opener_->AddObserver(opener_observer_.get()); 224 opener_->AddObserver(opener_observer_.get());
225 } 225 }
226 } 226 }
227 227
228 void FrameTreeNode::SetOriginalOpener(FrameTreeNode* opener) { 228 void FrameTreeNode::SetOriginalOpener(FrameTreeNode* opener) {
229 DCHECK(!original_opener_ || !opener); 229 DCHECK(!original_opener_ || !opener);
230 DCHECK(opener == nullptr || !opener->parent());
230 231
231 original_opener_ = opener; 232 original_opener_ = opener;
232 233
233 if (original_opener_) { 234 if (original_opener_) {
234 DCHECK(!original_opener_observer_); 235 DCHECK(!original_opener_observer_);
235 original_opener_observer_ = 236 original_opener_observer_ =
236 base::MakeUnique<OpenerDestroyedObserver>(this, true); 237 base::MakeUnique<OpenerDestroyedObserver>(this, true);
237 original_opener_->AddObserver(original_opener_observer_.get()); 238 original_opener_->AddObserver(original_opener_observer_.get());
238 } 239 }
239 } 240 }
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 557 }
557 return parent_->child_at(i + relative_offset); 558 return parent_->child_at(i + relative_offset);
558 } 559 }
559 } 560 }
560 561
561 NOTREACHED() << "FrameTreeNode not found in its parent's children."; 562 NOTREACHED() << "FrameTreeNode not found in its parent's children.";
562 return nullptr; 563 return nullptr;
563 } 564 }
564 565
565 } // namespace content 566 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_node.h ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698