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

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

Issue 2762423003: Made Frame constructors (and subclasses) take Page& instead of Page* (Closed)
Patch Set: Rebase Created 3 years, 9 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 WebFeaturePolicy* featurePolicy = securityContext()->getFeaturePolicy(); 412 WebFeaturePolicy* featurePolicy = securityContext()->getFeaturePolicy();
413 // The policy should always be initialized before checking it to ensure we 413 // The policy should always be initialized before checking it to ensure we
414 // properly inherit the parent policy. 414 // properly inherit the parent policy.
415 DCHECK(featurePolicy); 415 DCHECK(featurePolicy);
416 416
417 // Otherwise, check policy. 417 // Otherwise, check policy.
418 return featurePolicy->IsFeatureEnabled(feature); 418 return featurePolicy->IsFeatureEnabled(feature);
419 } 419 }
420 420
421 Frame::Frame(FrameClient* client, 421 Frame::Frame(FrameClient* client,
422 Page* page, 422 Page& page,
423 FrameOwner* owner, 423 FrameOwner* owner,
424 WindowProxyManager* windowProxyManager) 424 WindowProxyManager* windowProxyManager)
425 : m_treeNode(this), 425 : m_treeNode(this),
426 m_page(page), 426 m_page(&page),
427 m_owner(owner), 427 m_owner(owner),
428 m_client(client), 428 m_client(client),
429 m_windowProxyManager(windowProxyManager), 429 m_windowProxyManager(windowProxyManager),
430 m_isLoading(false) { 430 m_isLoading(false) {
431 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter); 431 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter);
432 432
433 DCHECK(m_page);
434
435 if (m_owner) 433 if (m_owner)
436 m_owner->setContentFrame(*this); 434 m_owner->setContentFrame(*this);
437 else 435 else
438 m_page->setMainFrame(this); 436 m_page->setMainFrame(this);
439 } 437 }
440 438
441 } // namespace blink 439 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698