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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 disconnectOwnerElement(); 95 disconnectOwnerElement();
96 // After this, we must no longer talk to the client since this clears 96 // After this, we must no longer talk to the client since this clears
97 // its owning reference back to our owning LocalFrame. 97 // its owning reference back to our owning LocalFrame.
98 m_client->detached(type); 98 m_client->detached(type);
99 m_client = nullptr; 99 m_client = nullptr;
100 m_host = nullptr; 100 m_host = nullptr;
101 } 101 }
102 102
103 void Frame::detachChildren() 103 void Frame::detachChildren()
104 { 104 {
105 typedef WillBeHeapVector<RefPtrWillBeMember<Frame>> FrameVector; 105 typedef HeapVector<Member<Frame>> FrameVector;
106 FrameVector childrenToDetach; 106 FrameVector childrenToDetach;
107 childrenToDetach.reserveCapacity(tree().childCount()); 107 childrenToDetach.reserveCapacity(tree().childCount());
108 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi bling()) 108 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi bling())
109 childrenToDetach.append(child); 109 childrenToDetach.append(child);
110 for (const auto& child : childrenToDetach) 110 for (const auto& child : childrenToDetach)
111 child->detach(FrameDetachType::Remove); 111 child->detach(FrameDetachType::Remove);
112 } 112 }
113 113
114 void Frame::disconnectOwnerElement() 114 void Frame::disconnectOwnerElement()
115 { 115 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return tree().parent()->isRemoteFrame(); 148 return tree().parent()->isRemoteFrame();
149 } 149 }
150 150
151 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const 151 HTMLFrameOwnerElement* Frame::deprecatedLocalOwner() const
152 { 152 {
153 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : nu llptr; 153 return m_owner && m_owner->isLocal() ? toHTMLFrameOwnerElement(m_owner) : nu llptr;
154 } 154 }
155 155
156 static ChromeClient& emptyChromeClient() 156 static ChromeClient& emptyChromeClient()
157 { 157 {
158 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<EmptyChromeClient>, client, (Empt yChromeClient::create())); 158 DEFINE_STATIC_LOCAL(Persistent<EmptyChromeClient>, client, (EmptyChromeClien t::create()));
159 return *client; 159 return *client;
160 } 160 }
161 161
162 ChromeClient& Frame::chromeClient() const 162 ChromeClient& Frame::chromeClient() const
163 { 163 {
164 if (Page* page = this->page()) 164 if (Page* page = this->page())
165 return page->chromeClient(); 165 return page->chromeClient();
166 return emptyChromeClient(); 166 return emptyChromeClient();
167 } 167 }
168 168
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 if (m_owner) { 312 if (m_owner) {
313 if (m_owner->isLocal()) 313 if (m_owner->isLocal())
314 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this); 314 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this);
315 } else { 315 } else {
316 page()->setMainFrame(this); 316 page()->setMainFrame(this);
317 } 317 }
318 } 318 }
319 319
320 } // namespace blink 320 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698