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

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: Rename & format. 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 params.GetResourceRequest().GetPreviewsState() | 970 params.GetResourceRequest().GetPreviewsState() |
969 WebURLRequest::kClientLoFiOn); 971 WebURLRequest::kClientLoFiOn);
970 params.SetAllowImagePlaceholder(); 972 params.SetAllowImagePlaceholder();
971 } 973 }
972 } 974 }
973 975
974 std::unique_ptr<WebURLLoader> LocalFrame::CreateURLLoader() { 976 std::unique_ptr<WebURLLoader> LocalFrame::CreateURLLoader() {
975 return Client()->CreateURLLoader(); 977 return Client()->CreateURLLoader();
976 } 978 }
977 979
980 WebPluginContainerBase* LocalFrame::GetWebPluginContainerBase(
981 Node* node) const {
982 if (GetDocument() && GetDocument()->IsPluginDocument()) {
983 PluginDocument* plugin_document = ToPluginDocument(GetDocument());
984 return plugin_document->GetPluginView()->GetWebPluginContainerBase();
985 }
986 if (!node) {
987 DCHECK(GetDocument());
988 node = GetDocument()->FocusedElement();
989 }
990
991 if (node) {
992 return node->GetWebPluginContainerBase();
993 }
994 return nullptr;
995 }
996
978 } // namespace blink 997 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698