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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 if (!parent || !parent->isLocalFrame()) 253 if (!parent || !parent->isLocalFrame())
254 return 1; 254 return 1;
255 return toLocalFrame(parent)->textZoomFactor(); 255 return toLocalFrame(parent)->textZoomFactor();
256 } 256 }
257 257
258 } // namespace 258 } // namespace
259 259
260 template class CORE_TEMPLATE_EXPORT Supplement<LocalFrame>; 260 template class CORE_TEMPLATE_EXPORT Supplement<LocalFrame>;
261 261
262 LocalFrame* LocalFrame::create(LocalFrameClient* client, 262 LocalFrame* LocalFrame::create(LocalFrameClient* client,
263 Page* page, 263 Page& page,
264 FrameOwner* owner, 264 FrameOwner* owner,
265 InterfaceProvider* interfaceProvider, 265 InterfaceProvider* interfaceProvider,
266 InterfaceRegistry* interfaceRegistry) { 266 InterfaceRegistry* interfaceRegistry) {
267 LocalFrame* frame = new LocalFrame( 267 LocalFrame* frame = new LocalFrame(
268 client, page, owner, 268 client, page, owner,
269 interfaceProvider ? interfaceProvider 269 interfaceProvider ? interfaceProvider
270 : InterfaceProvider::getEmptyInterfaceProvider(), 270 : InterfaceProvider::getEmptyInterfaceProvider(),
271 interfaceRegistry ? interfaceRegistry 271 interfaceRegistry ? interfaceRegistry
272 : InterfaceRegistry::getEmptyInterfaceRegistry()); 272 : InterfaceRegistry::getEmptyInterfaceRegistry());
273 probe::frameAttachedToParent(frame); 273 probe::frameAttachedToParent(frame);
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 } 837 }
838 838
839 return layers ? layers->toPrettyJSONString() : String(); 839 return layers ? layers->toPrettyJSONString() : String();
840 } 840 }
841 841
842 bool LocalFrame::shouldThrottleRendering() const { 842 bool LocalFrame::shouldThrottleRendering() const {
843 return view() && view()->shouldThrottleRendering(); 843 return view() && view()->shouldThrottleRendering();
844 } 844 }
845 845
846 inline LocalFrame::LocalFrame(LocalFrameClient* client, 846 inline LocalFrame::LocalFrame(LocalFrameClient* client,
847 Page* page, 847 Page& page,
848 FrameOwner* owner, 848 FrameOwner* owner,
849 InterfaceProvider* interfaceProvider, 849 InterfaceProvider* interfaceProvider,
850 InterfaceRegistry* interfaceRegistry) 850 InterfaceRegistry* interfaceRegistry)
851 : Frame(client, page, owner, LocalWindowProxyManager::create(*this)), 851 : Frame(client, page, owner, LocalWindowProxyManager::create(*this)),
852 m_frameScheduler(page->chromeClient().createFrameScheduler( 852 m_frameScheduler(page.chromeClient().createFrameScheduler(
853 client->frameBlameContext())), 853 client->frameBlameContext())),
854 m_loader(this), 854 m_loader(this),
855 m_navigationScheduler(NavigationScheduler::create(this)), 855 m_navigationScheduler(NavigationScheduler::create(this)),
856 m_script(ScriptController::create( 856 m_script(ScriptController::create(
857 *this, 857 *this,
858 *static_cast<LocalWindowProxyManager*>(getWindowProxyManager()))), 858 *static_cast<LocalWindowProxyManager*>(getWindowProxyManager()))),
859 m_editor(Editor::create(*this)), 859 m_editor(Editor::create(*this)),
860 m_spellChecker(SpellChecker::create(*this)), 860 m_spellChecker(SpellChecker::create(*this)),
861 m_selection(FrameSelection::create(*this)), 861 m_selection(FrameSelection::create(*this)),
862 m_eventHandler(new EventHandler(*this)), 862 m_eventHandler(new EventHandler(*this)),
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 913 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
914 m_frame->client()->frameBlameContext()->Enter(); 914 m_frame->client()->frameBlameContext()->Enter();
915 } 915 }
916 916
917 ScopedFrameBlamer::~ScopedFrameBlamer() { 917 ScopedFrameBlamer::~ScopedFrameBlamer() {
918 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 918 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
919 m_frame->client()->frameBlameContext()->Leave(); 919 m_frame->client()->frameBlameContext()->Leave();
920 } 920 }
921 921
922 } // namespace blink 922 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/frame/RemoteFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698