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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: Addressed comments from csharrison@. Created 3 years, 7 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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return nullptr; 154 return nullptr;
155 return ToLayoutPart(GetLayoutObject()); 155 return ToLayoutPart(GetLayoutObject());
156 } 156 }
157 157
158 void HTMLFrameOwnerElement::SetContentFrame(Frame& frame) { 158 void HTMLFrameOwnerElement::SetContentFrame(Frame& frame) {
159 // Make sure we will not end up with two frames referencing the same owner 159 // Make sure we will not end up with two frames referencing the same owner
160 // element. 160 // element.
161 DCHECK(!content_frame_ || content_frame_->Owner() != this); 161 DCHECK(!content_frame_ || content_frame_->Owner() != this);
162 // Disconnected frames should not be allowed to load. 162 // Disconnected frames should not be allowed to load.
163 DCHECK(isConnected()); 163 DCHECK(isConnected());
164
164 content_frame_ = &frame; 165 content_frame_ = &frame;
165 166
166 for (ContainerNode* node = this; node; node = node->ParentOrShadowHostNode()) 167 for (ContainerNode* node = this; node; node = node->ParentOrShadowHostNode())
167 node->IncrementConnectedSubframeCount(); 168 node->IncrementConnectedSubframeCount();
168 } 169 }
169 170
170 void HTMLFrameOwnerElement::ClearContentFrame() { 171 void HTMLFrameOwnerElement::ClearContentFrame() {
171 if (!content_frame_) 172 if (!content_frame_)
172 return; 173 return;
173 174
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 } 372 }
372 373
373 DEFINE_TRACE(HTMLFrameOwnerElement) { 374 DEFINE_TRACE(HTMLFrameOwnerElement) {
374 visitor->Trace(content_frame_); 375 visitor->Trace(content_frame_);
375 visitor->Trace(widget_); 376 visitor->Trace(widget_);
376 HTMLElement::Trace(visitor); 377 HTMLElement::Trace(visitor);
377 FrameOwner::Trace(visitor); 378 FrameOwner::Trace(visitor);
378 } 379 }
379 380
380 } // namespace blink 381 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698