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

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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 inline float parentTextZoomFactor(LocalFrame* frame) 161 inline float parentTextZoomFactor(LocalFrame* frame)
162 { 162 {
163 Frame* parent = frame->tree().parent(); 163 Frame* parent = frame->tree().parent();
164 if (!parent || !parent->isLocalFrame()) 164 if (!parent || !parent->isLocalFrame())
165 return 1; 165 return 1;
166 return toLocalFrame(parent)->textZoomFactor(); 166 return toLocalFrame(parent)->textZoomFactor();
167 } 167 }
168 168
169 } // namespace 169 } // namespace
170 170
171 PassRefPtrWillBeRawPtr<LocalFrame> LocalFrame::create(FrameLoaderClient* client, FrameHost* host, FrameOwner* owner) 171 PassRefPtrWillBeRawPtr<LocalFrame> LocalFrame::create(FrameLoaderClient* client, FrameHost* host, FrameOwner* owner, ServiceRegistry* serviceRegistry)
172 { 172 {
173 RefPtrWillBeRawPtr<LocalFrame> frame = adoptRefWillBeNoop(new LocalFrame(cli ent, host, owner)); 173 RefPtrWillBeRawPtr<LocalFrame> frame = adoptRefWillBeNoop(new LocalFrame(cli ent, host, owner, serviceRegistry));
174 InspectorInstrumentation::frameAttachedToParent(frame.get()); 174 InspectorInstrumentation::frameAttachedToParent(frame.get());
175 return frame.release(); 175 return frame.release();
176 } 176 }
177 177
178 void LocalFrame::setView(PassRefPtrWillBeRawPtr<FrameView> view) 178 void LocalFrame::setView(PassRefPtrWillBeRawPtr<FrameView> view)
179 { 179 {
180 ASSERT(!m_view || m_view != view); 180 ASSERT(!m_view || m_view != view);
181 ASSERT(!document() || !document()->isActive()); 181 ASSERT(!document() || !document()->isActive());
182 182
183 eventHandler().clear(); 183 eventHandler().clear();
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 return String(); 820 return String();
821 821
822 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye rTreeFlags>(flags)); 822 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye rTreeFlags>(flags));
823 } 823 }
824 824
825 bool LocalFrame::shouldThrottleRendering() const 825 bool LocalFrame::shouldThrottleRendering() const
826 { 826 {
827 return view() && view()->shouldThrottleRendering(); 827 return view() && view()->shouldThrottleRendering();
828 } 828 }
829 829
830 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner) 830 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner, ServiceRegistry* serviceRegistry)
831 : Frame(client, host, owner) 831 : Frame(client, host, owner)
832 , m_loader(this) 832 , m_loader(this)
833 , m_navigationScheduler(NavigationScheduler::create(this)) 833 , m_navigationScheduler(NavigationScheduler::create(this))
834 , m_script(ScriptController::create(this)) 834 , m_script(ScriptController::create(this))
835 , m_editor(Editor::create(*this)) 835 , m_editor(Editor::create(*this))
836 , m_spellChecker(SpellChecker::create(*this)) 836 , m_spellChecker(SpellChecker::create(*this))
837 , m_selection(FrameSelection::create(this)) 837 , m_selection(FrameSelection::create(this))
838 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this))) 838 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this)))
839 , m_console(FrameConsole::create(*this)) 839 , m_console(FrameConsole::create(*this))
840 , m_inputMethodController(InputMethodController::create(*this)) 840 , m_inputMethodController(InputMethodController::create(*this))
841 , m_navigationDisableCount(0) 841 , m_navigationDisableCount(0)
842 , m_pageZoomFactor(parentPageZoomFactor(this)) 842 , m_pageZoomFactor(parentPageZoomFactor(this))
843 , m_textZoomFactor(parentTextZoomFactor(this)) 843 , m_textZoomFactor(parentTextZoomFactor(this))
844 , m_inViewSourceMode(false) 844 , m_inViewSourceMode(false)
845 , m_serviceRegistry(serviceRegistry)
845 { 846 {
846 if (isLocalRoot()) 847 if (isLocalRoot())
847 m_instrumentingAgents = InstrumentingAgents::create(); 848 m_instrumentingAgents = InstrumentingAgents::create();
848 else 849 else
849 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 850 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
850 } 851 }
851 852
852 WebFrameScheduler* LocalFrame::frameScheduler() 853 WebFrameScheduler* LocalFrame::frameScheduler()
853 { 854 {
854 if (!m_frameScheduler.get()) 855 if (!m_frameScheduler.get())
(...skipping 23 matching lines...) Expand all
878 { 879 {
879 m_frame->disableNavigation(); 880 m_frame->disableNavigation();
880 } 881 }
881 882
882 FrameNavigationDisabler::~FrameNavigationDisabler() 883 FrameNavigationDisabler::~FrameNavigationDisabler()
883 { 884 {
884 m_frame->enableNavigation(); 885 m_frame->enableNavigation();
885 } 886 }
886 887
887 } // namespace blink 888 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698