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

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

Issue 2401333002: Add a blink InterfaceRegistry. (Closed)
Patch Set: Created 4 years, 2 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #include "platform/graphics/GraphicsContext.h" 78 #include "platform/graphics/GraphicsContext.h"
79 #include "platform/graphics/StaticBitmapImage.h" 79 #include "platform/graphics/StaticBitmapImage.h"
80 #include "platform/graphics/paint/ClipRecorder.h" 80 #include "platform/graphics/paint/ClipRecorder.h"
81 #include "platform/graphics/paint/PaintController.h" 81 #include "platform/graphics/paint/PaintController.h"
82 #include "platform/graphics/paint/SkPictureBuilder.h" 82 #include "platform/graphics/paint/SkPictureBuilder.h"
83 #include "platform/graphics/paint/TransformDisplayItem.h" 83 #include "platform/graphics/paint/TransformDisplayItem.h"
84 #include "platform/json/JSONValues.h" 84 #include "platform/json/JSONValues.h"
85 #include "platform/plugins/PluginData.h" 85 #include "platform/plugins/PluginData.h"
86 #include "platform/text/TextStream.h" 86 #include "platform/text/TextStream.h"
87 #include "public/platform/InterfaceProvider.h" 87 #include "public/platform/InterfaceProvider.h"
88 #include "public/platform/InterfaceRegistry.h"
88 #include "public/platform/WebFrameScheduler.h" 89 #include "public/platform/WebFrameScheduler.h"
89 #include "public/platform/WebScreenInfo.h" 90 #include "public/platform/WebScreenInfo.h"
90 #include "public/platform/WebViewScheduler.h" 91 #include "public/platform/WebViewScheduler.h"
91 #include "third_party/skia/include/core/SkImage.h" 92 #include "third_party/skia/include/core/SkImage.h"
92 #include "wtf/PtrUtil.h" 93 #include "wtf/PtrUtil.h"
93 #include "wtf/StdLibExtras.h" 94 #include "wtf/StdLibExtras.h"
94 #include <memory> 95 #include <memory>
95 96
96 namespace blink { 97 namespace blink {
97 98
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return toLocalFrame(parent)->textZoomFactor(); 240 return toLocalFrame(parent)->textZoomFactor();
240 } 241 }
241 242
242 } // namespace 243 } // namespace
243 244
244 template class CORE_TEMPLATE_EXPORT Supplement<LocalFrame>; 245 template class CORE_TEMPLATE_EXPORT Supplement<LocalFrame>;
245 246
246 LocalFrame* LocalFrame::create(FrameLoaderClient* client, 247 LocalFrame* LocalFrame::create(FrameLoaderClient* client,
247 FrameHost* host, 248 FrameHost* host,
248 FrameOwner* owner, 249 FrameOwner* owner,
249 InterfaceProvider* interfaceProvider) { 250 InterfaceProvider* interfaceProvider,
251 InterfaceRegistry* interfaceRegistry) {
250 LocalFrame* frame = new LocalFrame( 252 LocalFrame* frame = new LocalFrame(
251 client, host, owner, 253 client, host, owner,
252 interfaceProvider ? interfaceProvider 254 interfaceProvider ? interfaceProvider
253 : InterfaceProvider::getEmptyInterfaceProvider()); 255 : InterfaceProvider::getEmptyInterfaceProvider(),
256 interfaceRegistry ? interfaceRegistry
257 : InterfaceRegistry::getEmptyInterfaceRegistry());
254 InspectorInstrumentation::frameAttachedToParent(frame); 258 InspectorInstrumentation::frameAttachedToParent(frame);
255 return frame; 259 return frame;
256 } 260 }
257 261
258 void LocalFrame::setView(FrameView* view) { 262 void LocalFrame::setView(FrameView* view) {
259 ASSERT(!m_view || m_view != view); 263 ASSERT(!m_view || m_view != view);
260 ASSERT(!document() || !document()->isActive()); 264 ASSERT(!document() || !document()->isActive());
261 265
262 eventHandler().clear(); 266 eventHandler().clear();
263 267
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 return layers ? layers->toPrettyJSONString() : String(); 835 return layers ? layers->toPrettyJSONString() : String();
832 } 836 }
833 837
834 bool LocalFrame::shouldThrottleRendering() const { 838 bool LocalFrame::shouldThrottleRendering() const {
835 return view() && view()->shouldThrottleRendering(); 839 return view() && view()->shouldThrottleRendering();
836 } 840 }
837 841
838 inline LocalFrame::LocalFrame(FrameLoaderClient* client, 842 inline LocalFrame::LocalFrame(FrameLoaderClient* client,
839 FrameHost* host, 843 FrameHost* host,
840 FrameOwner* owner, 844 FrameOwner* owner,
841 InterfaceProvider* interfaceProvider) 845 InterfaceProvider* interfaceProvider,
846 InterfaceRegistry* interfaceRegistry)
842 : Frame(client, host, owner), 847 : Frame(client, host, owner),
843 m_frameScheduler(page()->chromeClient().createFrameScheduler( 848 m_frameScheduler(page()->chromeClient().createFrameScheduler(
844 client->frameBlameContext())), 849 client->frameBlameContext())),
845 m_loader(this), 850 m_loader(this),
846 m_navigationScheduler(NavigationScheduler::create(this)), 851 m_navigationScheduler(NavigationScheduler::create(this)),
847 m_script(ScriptController::create(this)), 852 m_script(ScriptController::create(this)),
848 m_editor(Editor::create(*this)), 853 m_editor(Editor::create(*this)),
849 m_spellChecker(SpellChecker::create(*this)), 854 m_spellChecker(SpellChecker::create(*this)),
850 m_selection(FrameSelection::create(this)), 855 m_selection(FrameSelection::create(this)),
851 m_eventHandler(new EventHandler(this)), 856 m_eventHandler(new EventHandler(this)),
852 m_console(FrameConsole::create(*this)), 857 m_console(FrameConsole::create(*this)),
853 m_inputMethodController(InputMethodController::create(*this)), 858 m_inputMethodController(InputMethodController::create(*this)),
854 m_navigationDisableCount(0), 859 m_navigationDisableCount(0),
855 m_pageZoomFactor(parentPageZoomFactor(this)), 860 m_pageZoomFactor(parentPageZoomFactor(this)),
856 m_textZoomFactor(parentTextZoomFactor(this)), 861 m_textZoomFactor(parentTextZoomFactor(this)),
857 m_inViewSourceMode(false), 862 m_inViewSourceMode(false),
858 m_interfaceProvider(interfaceProvider) { 863 m_interfaceProvider(interfaceProvider),
864 m_interfaceRegistry(interfaceRegistry) {
859 if (isLocalRoot()) 865 if (isLocalRoot())
860 m_instrumentingAgents = new InstrumentingAgents(); 866 m_instrumentingAgents = new InstrumentingAgents();
861 else 867 else
862 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 868 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
863 } 869 }
864 870
865 WebFrameScheduler* LocalFrame::frameScheduler() { 871 WebFrameScheduler* LocalFrame::frameScheduler() {
866 return m_frameScheduler.get(); 872 return m_frameScheduler.get();
867 } 873 }
868 874
(...skipping 29 matching lines...) Expand all
898 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 904 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
899 m_frame->client()->frameBlameContext()->Enter(); 905 m_frame->client()->frameBlameContext()->Enter();
900 } 906 }
901 907
902 ScopedFrameBlamer::~ScopedFrameBlamer() { 908 ScopedFrameBlamer::~ScopedFrameBlamer() {
903 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 909 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
904 m_frame->client()->frameBlameContext()->Leave(); 910 m_frame->client()->frameBlameContext()->Leave();
905 } 911 }
906 912
907 } // namespace blink 913 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698