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

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

Issue 2711763007: Replace FrameLoaderClient.h with LocalFrameClient.h and rename as needed. (Closed)
Patch Set: Created 3 years, 10 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "core/editing/InputMethodController.h" 43 #include "core/editing/InputMethodController.h"
44 #include "core/editing/serializers/Serialization.h" 44 #include "core/editing/serializers/Serialization.h"
45 #include "core/editing/spellcheck/IdleSpellCheckCallback.h" 45 #include "core/editing/spellcheck/IdleSpellCheckCallback.h"
46 #include "core/editing/spellcheck/SpellChecker.h" 46 #include "core/editing/spellcheck/SpellChecker.h"
47 #include "core/events/Event.h" 47 #include "core/events/Event.h"
48 #include "core/frame/EventHandlerRegistry.h" 48 #include "core/frame/EventHandlerRegistry.h"
49 #include "core/frame/FrameConsole.h" 49 #include "core/frame/FrameConsole.h"
50 #include "core/frame/FrameHost.h" 50 #include "core/frame/FrameHost.h"
51 #include "core/frame/FrameView.h" 51 #include "core/frame/FrameView.h"
52 #include "core/frame/LocalDOMWindow.h" 52 #include "core/frame/LocalDOMWindow.h"
53 #include "core/frame/LocalFrameClient.h"
53 #include "core/frame/PerformanceMonitor.h" 54 #include "core/frame/PerformanceMonitor.h"
54 #include "core/frame/Settings.h" 55 #include "core/frame/Settings.h"
55 #include "core/frame/VisualViewport.h" 56 #include "core/frame/VisualViewport.h"
56 #include "core/html/HTMLFrameElementBase.h" 57 #include "core/html/HTMLFrameElementBase.h"
57 #include "core/html/HTMLPlugInElement.h" 58 #include "core/html/HTMLPlugInElement.h"
58 #include "core/input/EventHandler.h" 59 #include "core/input/EventHandler.h"
59 #include "core/inspector/ConsoleMessage.h" 60 #include "core/inspector/ConsoleMessage.h"
60 #include "core/inspector/InspectorInstrumentation.h" 61 #include "core/inspector/InspectorInstrumentation.h"
61 #include "core/layout/HitTestResult.h" 62 #include "core/layout/HitTestResult.h"
62 #include "core/layout/LayoutView.h" 63 #include "core/layout/LayoutView.h"
63 #include "core/layout/api/LayoutPartItem.h" 64 #include "core/layout/api/LayoutPartItem.h"
64 #include "core/layout/api/LayoutViewItem.h" 65 #include "core/layout/api/LayoutViewItem.h"
65 #include "core/layout/compositing/PaintLayerCompositor.h" 66 #include "core/layout/compositing/PaintLayerCompositor.h"
66 #include "core/loader/FrameLoadRequest.h" 67 #include "core/loader/FrameLoadRequest.h"
67 #include "core/loader/FrameLoaderClient.h"
68 #include "core/loader/NavigationScheduler.h" 68 #include "core/loader/NavigationScheduler.h"
69 #include "core/page/ChromeClient.h" 69 #include "core/page/ChromeClient.h"
70 #include "core/page/FocusController.h" 70 #include "core/page/FocusController.h"
71 #include "core/page/Page.h" 71 #include "core/page/Page.h"
72 #include "core/page/scrolling/ScrollingCoordinator.h" 72 #include "core/page/scrolling/ScrollingCoordinator.h"
73 #include "core/paint/ObjectPainter.h" 73 #include "core/paint/ObjectPainter.h"
74 #include "core/paint/PaintInfo.h" 74 #include "core/paint/PaintInfo.h"
75 #include "core/paint/PaintLayer.h" 75 #include "core/paint/PaintLayer.h"
76 #include "core/paint/PaintLayerPainter.h" 76 #include "core/paint/PaintLayerPainter.h"
77 #include "core/paint/TransformRecorder.h" 77 #include "core/paint/TransformRecorder.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 Frame* parent = frame->tree().parent(); 253 Frame* parent = frame->tree().parent();
254 if (!parent || !parent->isLocalFrame()) 254 if (!parent || !parent->isLocalFrame())
255 return 1; 255 return 1;
256 return toLocalFrame(parent)->textZoomFactor(); 256 return toLocalFrame(parent)->textZoomFactor();
257 } 257 }
258 258
259 } // namespace 259 } // namespace
260 260
261 template class CORE_TEMPLATE_EXPORT Supplement<LocalFrame>; 261 template class CORE_TEMPLATE_EXPORT Supplement<LocalFrame>;
262 262
263 LocalFrame* LocalFrame::create(FrameLoaderClient* client, 263 LocalFrame* LocalFrame::create(LocalFrameClient* client,
264 FrameHost* host, 264 FrameHost* host,
265 FrameOwner* owner, 265 FrameOwner* owner,
266 InterfaceProvider* interfaceProvider, 266 InterfaceProvider* interfaceProvider,
267 InterfaceRegistry* interfaceRegistry) { 267 InterfaceRegistry* interfaceRegistry) {
268 LocalFrame* frame = new LocalFrame( 268 LocalFrame* frame = new LocalFrame(
269 client, host, owner, 269 client, host, owner,
270 interfaceProvider ? interfaceProvider 270 interfaceProvider ? interfaceProvider
271 : InterfaceProvider::getEmptyInterfaceProvider(), 271 : InterfaceProvider::getEmptyInterfaceProvider(),
272 interfaceRegistry ? interfaceRegistry 272 interfaceRegistry ? interfaceRegistry
273 : InterfaceRegistry::getEmptyInterfaceRegistry()); 273 : InterfaceRegistry::getEmptyInterfaceRegistry());
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // This is the earliest that scripting can be disabled: 431 // This is the earliest that scripting can be disabled:
432 // - FrameLoader::detach() can fire XHR abort events 432 // - FrameLoader::detach() can fire XHR abort events
433 // - Document::shutdown()'s deferred widget updates can run script. 433 // - Document::shutdown()'s deferred widget updates can run script.
434 ScriptForbiddenScope forbidScript; 434 ScriptForbiddenScope forbidScript;
435 m_loader.clear(); 435 m_loader.clear();
436 if (!client()) 436 if (!client())
437 return; 437 return;
438 438
439 client()->willBeDetached(); 439 client()->willBeDetached();
440 // Notify ScriptController that the frame is closing, since its cleanup ends 440 // Notify ScriptController that the frame is closing, since its cleanup ends
441 // up calling back to FrameLoaderClient via WindowProxy. 441 // up calling back to LocalFrameClient via WindowProxy.
442 script().clearForClose(); 442 script().clearForClose();
443 setView(nullptr); 443 setView(nullptr);
444 444
445 m_host->eventHandlerRegistry().didRemoveAllEventHandlers(*domWindow()); 445 m_host->eventHandlerRegistry().didRemoveAllEventHandlers(*domWindow());
446 446
447 domWindow()->frameDestroyed(); 447 domWindow()->frameDestroyed();
448 448
449 // TODO: Page should take care of updating focus/scrolling instead of Frame. 449 // TODO: Page should take care of updating focus/scrolling instead of Frame.
450 // TODO: It's unclear as to why this is called more than once, but it is, 450 // TODO: It's unclear as to why this is called more than once, but it is,
451 // so page() could be null. 451 // so page() could be null.
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 } 841 }
842 } 842 }
843 843
844 return layers ? layers->toPrettyJSONString() : String(); 844 return layers ? layers->toPrettyJSONString() : String();
845 } 845 }
846 846
847 bool LocalFrame::shouldThrottleRendering() const { 847 bool LocalFrame::shouldThrottleRendering() const {
848 return view() && view()->shouldThrottleRendering(); 848 return view() && view()->shouldThrottleRendering();
849 } 849 }
850 850
851 inline LocalFrame::LocalFrame(FrameLoaderClient* client, 851 inline LocalFrame::LocalFrame(LocalFrameClient* client,
852 FrameHost* host, 852 FrameHost* host,
853 FrameOwner* owner, 853 FrameOwner* owner,
854 InterfaceProvider* interfaceProvider, 854 InterfaceProvider* interfaceProvider,
855 InterfaceRegistry* interfaceRegistry) 855 InterfaceRegistry* interfaceRegistry)
856 : Frame(client, host, owner), 856 : Frame(client, host, owner),
857 m_frameScheduler(page()->chromeClient().createFrameScheduler( 857 m_frameScheduler(page()->chromeClient().createFrameScheduler(
858 client->frameBlameContext())), 858 client->frameBlameContext())),
859 m_loader(this), 859 m_loader(this),
860 m_navigationScheduler(NavigationScheduler::create(this)), 860 m_navigationScheduler(NavigationScheduler::create(this)),
861 m_script(ScriptController::create(this)), 861 m_script(ScriptController::create(this)),
(...skipping 22 matching lines...) Expand all
884 WebFrameScheduler* LocalFrame::frameScheduler() { 884 WebFrameScheduler* LocalFrame::frameScheduler() {
885 return m_frameScheduler.get(); 885 return m_frameScheduler.get();
886 } 886 }
887 887
888 void LocalFrame::scheduleVisualUpdateUnlessThrottled() { 888 void LocalFrame::scheduleVisualUpdateUnlessThrottled() {
889 if (shouldThrottleRendering()) 889 if (shouldThrottleRendering())
890 return; 890 return;
891 page()->animator().scheduleVisualUpdate(this); 891 page()->animator().scheduleVisualUpdate(this);
892 } 892 }
893 893
894 FrameLoaderClient* LocalFrame::client() const { 894 LocalFrameClient* LocalFrame::client() const {
895 return static_cast<FrameLoaderClient*>(Frame::client()); 895 return static_cast<LocalFrameClient*>(Frame::client());
896 } 896 }
897 897
898 PluginData* LocalFrame::pluginData() const { 898 PluginData* LocalFrame::pluginData() const {
899 if (!loader().allowPlugins(NotAboutToInstantiatePlugin)) 899 if (!loader().allowPlugins(NotAboutToInstantiatePlugin))
900 return nullptr; 900 return nullptr;
901 return page()->pluginData( 901 return page()->pluginData(
902 tree().top()->securityContext()->getSecurityOrigin()); 902 tree().top()->securityContext()->getSecurityOrigin());
903 } 903 }
904 904
905 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); 905 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame);
(...skipping 11 matching lines...) Expand all
917 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 917 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
918 m_frame->client()->frameBlameContext()->Enter(); 918 m_frame->client()->frameBlameContext()->Enter();
919 } 919 }
920 920
921 ScopedFrameBlamer::~ScopedFrameBlamer() { 921 ScopedFrameBlamer::~ScopedFrameBlamer() {
922 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 922 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
923 m_frame->client()->frameBlameContext()->Leave(); 923 m_frame->client()->frameBlameContext()->Leave();
924 } 924 }
925 925
926 } // namespace blink 926 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp ('k') | third_party/WebKit/Source/core/frame/VisualViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698