OLD | NEW |
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #include "platform/RuntimeEnabledFeatures.h" | 74 #include "platform/RuntimeEnabledFeatures.h" |
75 #include "platform/ScriptForbiddenScope.h" | 75 #include "platform/ScriptForbiddenScope.h" |
76 #include "platform/graphics/GraphicsContext.h" | 76 #include "platform/graphics/GraphicsContext.h" |
77 #include "platform/graphics/StaticBitmapImage.h" | 77 #include "platform/graphics/StaticBitmapImage.h" |
78 #include "platform/graphics/paint/ClipRecorder.h" | 78 #include "platform/graphics/paint/ClipRecorder.h" |
79 #include "platform/graphics/paint/PaintController.h" | 79 #include "platform/graphics/paint/PaintController.h" |
80 #include "platform/graphics/paint/SkPictureBuilder.h" | 80 #include "platform/graphics/paint/SkPictureBuilder.h" |
81 #include "platform/graphics/paint/TransformDisplayItem.h" | 81 #include "platform/graphics/paint/TransformDisplayItem.h" |
82 #include "platform/plugins/PluginData.h" | 82 #include "platform/plugins/PluginData.h" |
83 #include "platform/text/TextStream.h" | 83 #include "platform/text/TextStream.h" |
84 #include "public/platform/ServiceRegistry.h" | 84 #include "public/platform/InterfaceProvider.h" |
85 #include "public/platform/WebFrameScheduler.h" | 85 #include "public/platform/WebFrameScheduler.h" |
86 #include "public/platform/WebScreenInfo.h" | 86 #include "public/platform/WebScreenInfo.h" |
87 #include "public/platform/WebViewScheduler.h" | 87 #include "public/platform/WebViewScheduler.h" |
88 #include "third_party/skia/include/core/SkImage.h" | 88 #include "third_party/skia/include/core/SkImage.h" |
89 #include "wtf/PtrUtil.h" | 89 #include "wtf/PtrUtil.h" |
90 #include "wtf/StdLibExtras.h" | 90 #include "wtf/StdLibExtras.h" |
91 #include <memory> | 91 #include <memory> |
92 | 92 |
93 namespace blink { | 93 namespace blink { |
94 | 94 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 Frame* parent = frame->tree().parent(); | 235 Frame* parent = frame->tree().parent(); |
236 if (!parent || !parent->isLocalFrame()) | 236 if (!parent || !parent->isLocalFrame()) |
237 return 1; | 237 return 1; |
238 return toLocalFrame(parent)->textZoomFactor(); | 238 return toLocalFrame(parent)->textZoomFactor(); |
239 } | 239 } |
240 | 240 |
241 } // namespace | 241 } // namespace |
242 | 242 |
243 template class CORE_TEMPLATE_EXPORT Supplement<LocalFrame>; | 243 template class CORE_TEMPLATE_EXPORT Supplement<LocalFrame>; |
244 | 244 |
245 LocalFrame* LocalFrame::create(FrameLoaderClient* client, FrameHost* host, Frame
Owner* owner, ServiceRegistry* serviceRegistry) | 245 LocalFrame* LocalFrame::create(FrameLoaderClient* client, FrameHost* host, Frame
Owner* owner, InterfaceProvider* interfaceProvider) |
246 { | 246 { |
247 LocalFrame* frame = new LocalFrame(client, host, owner, serviceRegistry ? se
rviceRegistry : ServiceRegistry::getEmptyServiceRegistry()); | 247 LocalFrame* frame = new LocalFrame(client, host, owner, interfaceProvider ?
interfaceProvider : InterfaceProvider::getEmptyInterfaceProvider()); |
248 InspectorInstrumentation::frameAttachedToParent(frame); | 248 InspectorInstrumentation::frameAttachedToParent(frame); |
249 return frame; | 249 return frame; |
250 } | 250 } |
251 | 251 |
252 void LocalFrame::setView(FrameView* view) | 252 void LocalFrame::setView(FrameView* view) |
253 { | 253 { |
254 ASSERT(!m_view || m_view != view); | 254 ASSERT(!m_view || m_view != view); |
255 ASSERT(!document() || !document()->isActive()); | 255 ASSERT(!document() || !document()->isActive()); |
256 | 256 |
257 eventHandler().clear(); | 257 eventHandler().clear(); |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 } | 795 } |
796 | 796 |
797 return layerTree ? layerTree->toPrettyJSONString() : String(); | 797 return layerTree ? layerTree->toPrettyJSONString() : String(); |
798 } | 798 } |
799 | 799 |
800 bool LocalFrame::shouldThrottleRendering() const | 800 bool LocalFrame::shouldThrottleRendering() const |
801 { | 801 { |
802 return view() && view()->shouldThrottleRendering(); | 802 return view() && view()->shouldThrottleRendering(); |
803 } | 803 } |
804 | 804 |
805 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
wner* owner, ServiceRegistry* serviceRegistry) | 805 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
wner* owner, InterfaceProvider* interfaceProvider) |
806 : Frame(client, host, owner) | 806 : Frame(client, host, owner) |
807 , m_frameScheduler(page()->chromeClient().createFrameScheduler(client->frame
BlameContext())) | 807 , m_frameScheduler(page()->chromeClient().createFrameScheduler(client->frame
BlameContext())) |
808 , m_loader(this) | 808 , m_loader(this) |
809 , m_navigationScheduler(NavigationScheduler::create(this)) | 809 , m_navigationScheduler(NavigationScheduler::create(this)) |
810 , m_script(ScriptController::create(this)) | 810 , m_script(ScriptController::create(this)) |
811 , m_editor(Editor::create(*this)) | 811 , m_editor(Editor::create(*this)) |
812 , m_spellChecker(SpellChecker::create(*this)) | 812 , m_spellChecker(SpellChecker::create(*this)) |
813 , m_selection(FrameSelection::create(this)) | 813 , m_selection(FrameSelection::create(this)) |
814 , m_eventHandler(new EventHandler(this)) | 814 , m_eventHandler(new EventHandler(this)) |
815 , m_console(FrameConsole::create(*this)) | 815 , m_console(FrameConsole::create(*this)) |
816 , m_inputMethodController(InputMethodController::create(*this)) | 816 , m_inputMethodController(InputMethodController::create(*this)) |
817 , m_navigationDisableCount(0) | 817 , m_navigationDisableCount(0) |
818 , m_pageZoomFactor(parentPageZoomFactor(this)) | 818 , m_pageZoomFactor(parentPageZoomFactor(this)) |
819 , m_textZoomFactor(parentTextZoomFactor(this)) | 819 , m_textZoomFactor(parentTextZoomFactor(this)) |
820 , m_inViewSourceMode(false) | 820 , m_inViewSourceMode(false) |
821 , m_serviceRegistry(serviceRegistry) | 821 , m_interfaceProvider(interfaceProvider) |
822 { | 822 { |
823 if (isLocalRoot()) | 823 if (isLocalRoot()) |
824 m_instrumentingAgents = new InstrumentingAgents(); | 824 m_instrumentingAgents = new InstrumentingAgents(); |
825 else | 825 else |
826 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 826 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
827 } | 827 } |
828 | 828 |
829 WebFrameScheduler* LocalFrame::frameScheduler() | 829 WebFrameScheduler* LocalFrame::frameScheduler() |
830 { | 830 { |
831 return m_frameScheduler.get(); | 831 return m_frameScheduler.get(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 m_frame->client()->frameBlameContext()->Enter(); | 870 m_frame->client()->frameBlameContext()->Enter(); |
871 } | 871 } |
872 | 872 |
873 ScopedFrameBlamer::~ScopedFrameBlamer() | 873 ScopedFrameBlamer::~ScopedFrameBlamer() |
874 { | 874 { |
875 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 875 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
876 m_frame->client()->frameBlameContext()->Leave(); | 876 m_frame->client()->frameBlameContext()->Leave(); |
877 } | 877 } |
878 | 878 |
879 } // namespace blink | 879 } // namespace blink |
OLD | NEW |