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

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

Issue 2888203006: Move the logic to retrieve the WebPluginContainer to LocalFrame and Node. (Closed)
Patch Set: Ensure we have a valid PluginView before using it. Created 3 years, 7 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/FrameView.h" 50 #include "core/frame/FrameView.h"
51 #include "core/frame/LocalDOMWindow.h" 51 #include "core/frame/LocalDOMWindow.h"
52 #include "core/frame/LocalFrameClient.h" 52 #include "core/frame/LocalFrameClient.h"
53 #include "core/frame/PerformanceMonitor.h" 53 #include "core/frame/PerformanceMonitor.h"
54 #include "core/frame/Settings.h" 54 #include "core/frame/Settings.h"
55 #include "core/frame/VisualViewport.h" 55 #include "core/frame/VisualViewport.h"
56 #include "core/html/HTMLFrameElementBase.h" 56 #include "core/html/HTMLFrameElementBase.h"
57 #include "core/html/HTMLPlugInElement.h" 57 #include "core/html/HTMLPlugInElement.h"
58 #include "core/html/PluginDocument.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/layout/HitTestResult.h" 61 #include "core/layout/HitTestResult.h"
61 #include "core/layout/LayoutView.h" 62 #include "core/layout/LayoutView.h"
62 #include "core/layout/api/LayoutPartItem.h" 63 #include "core/layout/api/LayoutPartItem.h"
63 #include "core/layout/api/LayoutViewItem.h" 64 #include "core/layout/api/LayoutViewItem.h"
64 #include "core/layout/compositing/PaintLayerCompositor.h" 65 #include "core/layout/compositing/PaintLayerCompositor.h"
65 #include "core/loader/DocumentLoader.h" 66 #include "core/loader/DocumentLoader.h"
66 #include "core/loader/FrameLoadRequest.h" 67 #include "core/loader/FrameLoadRequest.h"
67 #include "core/loader/NavigationScheduler.h" 68 #include "core/loader/NavigationScheduler.h"
68 #include "core/page/ChromeClient.h" 69 #include "core/page/ChromeClient.h"
69 #include "core/page/FocusController.h" 70 #include "core/page/FocusController.h"
70 #include "core/page/Page.h" 71 #include "core/page/Page.h"
71 #include "core/page/scrolling/ScrollingCoordinator.h" 72 #include "core/page/scrolling/ScrollingCoordinator.h"
72 #include "core/paint/ObjectPainter.h" 73 #include "core/paint/ObjectPainter.h"
73 #include "core/paint/PaintInfo.h" 74 #include "core/paint/PaintInfo.h"
74 #include "core/paint/PaintLayer.h" 75 #include "core/paint/PaintLayer.h"
75 #include "core/paint/PaintLayerPainter.h" 76 #include "core/paint/PaintLayerPainter.h"
76 #include "core/paint/TransformRecorder.h" 77 #include "core/paint/TransformRecorder.h"
78 #include "core/plugins/PluginView.h"
77 #include "core/probe/CoreProbes.h" 79 #include "core/probe/CoreProbes.h"
78 #include "core/svg/SVGDocumentExtensions.h" 80 #include "core/svg/SVGDocumentExtensions.h"
79 #include "core/timing/Performance.h" 81 #include "core/timing/Performance.h"
80 #include "platform/DragImage.h" 82 #include "platform/DragImage.h"
81 #include "platform/PluginScriptForbiddenScope.h" 83 #include "platform/PluginScriptForbiddenScope.h"
82 #include "platform/RuntimeEnabledFeatures.h" 84 #include "platform/RuntimeEnabledFeatures.h"
83 #include "platform/ScriptForbiddenScope.h" 85 #include "platform/ScriptForbiddenScope.h"
84 #include "platform/WebFrameScheduler.h" 86 #include "platform/WebFrameScheduler.h"
85 #include "platform/graphics/GraphicsContext.h" 87 #include "platform/graphics/GraphicsContext.h"
86 #include "platform/graphics/StaticBitmapImage.h" 88 #include "platform/graphics/StaticBitmapImage.h"
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 params.GetResourceRequest().GetPreviewsState() | 969 params.GetResourceRequest().GetPreviewsState() |
968 WebURLRequest::kClientLoFiOn); 970 WebURLRequest::kClientLoFiOn);
969 params.SetAllowImagePlaceholder(); 971 params.SetAllowImagePlaceholder();
970 } 972 }
971 } 973 }
972 974
973 std::unique_ptr<WebURLLoader> LocalFrame::CreateURLLoader() { 975 std::unique_ptr<WebURLLoader> LocalFrame::CreateURLLoader() {
974 return Client()->CreateURLLoader(); 976 return Client()->CreateURLLoader();
975 } 977 }
976 978
979 WebPluginContainerBase* LocalFrame::GetWebPluginContainerBase(
980 Node* node) const {
981 if (GetDocument() && GetDocument()->IsPluginDocument()) {
982 PluginDocument* plugin_document = ToPluginDocument(GetDocument());
983 if (plugin_document->GetPluginView()) {
984 return plugin_document->GetPluginView()->GetWebPluginContainerBase();
985 }
986 }
987 if (!node) {
988 DCHECK(GetDocument());
989 node = GetDocument()->FocusedElement();
990 }
991
992 if (node) {
993 return node->GetWebPluginContainerBase();
994 }
995 return nullptr;
996 }
997
977 } // namespace blink 998 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/plugins/PluginView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698