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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2869203002: Cleanup around LocalFrame initialization (Closed)
Patch Set: +test fix 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 client, page, owner, 273 client, page, owner,
274 interface_provider ? interface_provider 274 interface_provider ? interface_provider
275 : InterfaceProvider::GetEmptyInterfaceProvider(), 275 : InterfaceProvider::GetEmptyInterfaceProvider(),
276 interface_registry ? interface_registry 276 interface_registry ? interface_registry
277 : InterfaceRegistry::GetEmptyInterfaceRegistry()); 277 : InterfaceRegistry::GetEmptyInterfaceRegistry());
278 probe::frameAttachedToParent(frame); 278 probe::frameAttachedToParent(frame);
279 return frame; 279 return frame;
280 } 280 }
281 281
282 void LocalFrame::Init() { 282 void LocalFrame::Init() {
283 // Initialization code needs to run first as the call to m_loader.init() can
284 // actually lead to this object being freed!
285 DCHECK(!GetInitializationVector().IsEmpty()); 283 DCHECK(!GetInitializationVector().IsEmpty());
286 for (auto& initilization_callback : GetInitializationVector()) { 284 for (auto& initilization_callback : GetInitializationVector()) {
287 initilization_callback(this); 285 initilization_callback(this);
288 } 286 }
289 287
290 loader_.Init(); 288 loader_.Init();
291 } 289 }
292 290
293 void LocalFrame::SetView(FrameView* view) { 291 void LocalFrame::SetView(FrameView* view) {
294 ASSERT(!view_ || view_ != view); 292 ASSERT(!view_ || view_ != view);
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 if (Client() && 964 if (Client() &&
967 Client()->ShouldUseClientLoFiForRequest(params.GetResourceRequest())) { 965 Client()->ShouldUseClientLoFiForRequest(params.GetResourceRequest())) {
968 params.MutableResourceRequest().SetPreviewsState( 966 params.MutableResourceRequest().SetPreviewsState(
969 params.GetResourceRequest().GetPreviewsState() | 967 params.GetResourceRequest().GetPreviewsState() |
970 WebURLRequest::kClientLoFiOn); 968 WebURLRequest::kClientLoFiOn);
971 params.SetAllowImagePlaceholder(); 969 params.SetAllowImagePlaceholder();
972 } 970 }
973 } 971 }
974 972
975 } // namespace blink 973 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698