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

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: rebase 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 LocalFrame* LocalFrame::create(FrameLoaderClient* client, FrameHost* host, Frame Owner* owner) 168 LocalFrame* LocalFrame::create(FrameLoaderClient* client, FrameHost* host, Frame Owner* owner, ServiceRegistry* serviceRegistry)
169 { 169 {
170 LocalFrame* frame = new LocalFrame(client, host, owner); 170 LocalFrame* frame = new LocalFrame(client, host, owner, serviceRegistry);
171 InspectorInstrumentation::frameAttachedToParent(frame); 171 InspectorInstrumentation::frameAttachedToParent(frame);
172 return frame; 172 return frame;
173 } 173 }
174 174
175 void LocalFrame::setView(FrameView* view) 175 void LocalFrame::setView(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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 return String(); 809 return String();
810 810
811 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye rTreeFlags>(flags)); 811 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye rTreeFlags>(flags));
812 } 812 }
813 813
814 bool LocalFrame::shouldThrottleRendering() const 814 bool LocalFrame::shouldThrottleRendering() const
815 { 815 {
816 return view() && view()->shouldThrottleRendering(); 816 return view() && view()->shouldThrottleRendering();
817 } 817 }
818 818
819 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner) 819 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner, ServiceRegistry* serviceRegistry)
820 : Frame(client, host, owner) 820 : Frame(client, host, owner)
821 , m_loader(this) 821 , m_loader(this)
822 , m_navigationScheduler(NavigationScheduler::create(this)) 822 , m_navigationScheduler(NavigationScheduler::create(this))
823 , m_script(ScriptController::create(this)) 823 , m_script(ScriptController::create(this))
824 , m_editor(Editor::create(*this)) 824 , m_editor(Editor::create(*this))
825 , m_spellChecker(SpellChecker::create(*this)) 825 , m_spellChecker(SpellChecker::create(*this))
826 , m_selection(FrameSelection::create(this)) 826 , m_selection(FrameSelection::create(this))
827 , m_eventHandler(new EventHandler(this)) 827 , m_eventHandler(new EventHandler(this))
828 , m_console(FrameConsole::create(*this)) 828 , m_console(FrameConsole::create(*this))
829 , m_inputMethodController(InputMethodController::create(*this)) 829 , m_inputMethodController(InputMethodController::create(*this))
830 , m_navigationDisableCount(0) 830 , m_navigationDisableCount(0)
831 , m_pageZoomFactor(parentPageZoomFactor(this)) 831 , m_pageZoomFactor(parentPageZoomFactor(this))
832 , m_textZoomFactor(parentTextZoomFactor(this)) 832 , m_textZoomFactor(parentTextZoomFactor(this))
833 , m_inViewSourceMode(false) 833 , m_inViewSourceMode(false)
834 , m_serviceRegistry(serviceRegistry)
834 { 835 {
835 if (isLocalRoot()) 836 if (isLocalRoot())
836 m_instrumentingAgents = InstrumentingAgents::create(); 837 m_instrumentingAgents = InstrumentingAgents::create();
837 else 838 else
838 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 839 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
839 } 840 }
840 841
841 WebFrameScheduler* LocalFrame::frameScheduler() 842 WebFrameScheduler* LocalFrame::frameScheduler()
842 { 843 {
843 if (!m_frameScheduler.get()) 844 if (!m_frameScheduler.get())
(...skipping 22 matching lines...) Expand all
866 { 867 {
867 m_frame->disableNavigation(); 868 m_frame->disableNavigation();
868 } 869 }
869 870
870 FrameNavigationDisabler::~FrameNavigationDisabler() 871 FrameNavigationDisabler::~FrameNavigationDisabler()
871 { 872 {
872 m_frame->enableNavigation(); 873 m_frame->enableNavigation();
873 } 874 }
874 875
875 } // namespace blink 876 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698