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

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

Issue 1830883002: Add blink::ServiceRegistry and expose it from LocalFrame and Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 inline float parentTextZoomFactor(LocalFrame* frame) 158 inline float parentTextZoomFactor(LocalFrame* frame)
159 { 159 {
160 Frame* parent = frame->tree().parent(); 160 Frame* parent = frame->tree().parent();
161 if (!parent || !parent->isLocalFrame()) 161 if (!parent || !parent->isLocalFrame())
162 return 1; 162 return 1;
163 return toLocalFrame(parent)->textZoomFactor(); 163 return toLocalFrame(parent)->textZoomFactor();
164 } 164 }
165 165
166 } // namespace 166 } // namespace
167 167
168 PassRefPtrWillBeRawPtr<LocalFrame> LocalFrame::create(FrameLoaderClient* client, FrameHost* host, FrameOwner* owner) 168 PassRefPtrWillBeRawPtr<LocalFrame> LocalFrame::create(FrameLoaderClient* client, FrameHost* host, FrameOwner* owner, ServiceRegistry* serviceRegistry)
169 { 169 {
170 RefPtrWillBeRawPtr<LocalFrame> frame = adoptRefWillBeNoop(new LocalFrame(cli ent, host, owner)); 170 RefPtrWillBeRawPtr<LocalFrame> frame = adoptRefWillBeNoop(new LocalFrame(cli ent, host, owner, serviceRegistry));
171 InspectorInstrumentation::frameAttachedToParent(frame.get()); 171 InspectorInstrumentation::frameAttachedToParent(frame.get());
172 return frame.release(); 172 return frame.release();
173 } 173 }
174 174
175 void LocalFrame::setView(PassRefPtrWillBeRawPtr<FrameView> view) 175 void LocalFrame::setView(PassRefPtrWillBeRawPtr<FrameView> view)
176 { 176 {
177 ASSERT(!m_view || m_view != view); 177 ASSERT(!m_view || m_view != view);
178 ASSERT(!document() || !document()->isActive()); 178 ASSERT(!document() || !document()->isActive());
179 179
180 eventHandler().clear(); 180 eventHandler().clear();
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 return String(); 816 return String();
817 817
818 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye rTreeFlags>(flags)); 818 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye rTreeFlags>(flags));
819 } 819 }
820 820
821 bool LocalFrame::shouldThrottleRendering() const 821 bool LocalFrame::shouldThrottleRendering() const
822 { 822 {
823 return view() && view()->shouldThrottleRendering(); 823 return view() && view()->shouldThrottleRendering();
824 } 824 }
825 825
826 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner) 826 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner, ServiceRegistry* serviceRegistry)
827 : Frame(client, host, owner) 827 : Frame(client, host, owner)
828 , m_loader(this) 828 , m_loader(this)
829 , m_navigationScheduler(NavigationScheduler::create(this)) 829 , m_navigationScheduler(NavigationScheduler::create(this))
830 , m_script(ScriptController::create(this)) 830 , m_script(ScriptController::create(this))
831 , m_editor(Editor::create(*this)) 831 , m_editor(Editor::create(*this))
832 , m_spellChecker(SpellChecker::create(*this)) 832 , m_spellChecker(SpellChecker::create(*this))
833 , m_selection(FrameSelection::create(this)) 833 , m_selection(FrameSelection::create(this))
834 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this))) 834 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this)))
835 , m_console(FrameConsole::create(*this)) 835 , m_console(FrameConsole::create(*this))
836 , m_inputMethodController(InputMethodController::create(*this)) 836 , m_inputMethodController(InputMethodController::create(*this))
837 , m_navigationDisableCount(0) 837 , m_navigationDisableCount(0)
838 , m_pageZoomFactor(parentPageZoomFactor(this)) 838 , m_pageZoomFactor(parentPageZoomFactor(this))
839 , m_textZoomFactor(parentTextZoomFactor(this)) 839 , m_textZoomFactor(parentTextZoomFactor(this))
840 , m_inViewSourceMode(false) 840 , m_inViewSourceMode(false)
841 , m_serviceRegistry(serviceRegistry)
841 { 842 {
842 if (isLocalRoot()) 843 if (isLocalRoot())
843 m_instrumentingAgents = InstrumentingAgents::create(); 844 m_instrumentingAgents = InstrumentingAgents::create();
844 else 845 else
845 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 846 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
846 } 847 }
847 848
848 WebFrameScheduler* LocalFrame::frameScheduler() 849 WebFrameScheduler* LocalFrame::frameScheduler()
849 { 850 {
850 if (!m_frameScheduler.get()) 851 if (!m_frameScheduler.get())
(...skipping 23 matching lines...) Expand all
874 { 875 {
875 m_frame->disableNavigation(); 876 m_frame->disableNavigation();
876 } 877 }
877 878
878 FrameNavigationDisabler::~FrameNavigationDisabler() 879 FrameNavigationDisabler::~FrameNavigationDisabler()
879 { 880 {
880 m_frame->enableNavigation(); 881 m_frame->enableNavigation();
881 } 882 }
882 883
883 } // namespace blink 884 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698