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

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

Issue 2888203006: Move the logic to retrieve the WebPluginContainer to LocalFrame and Node. (Closed)
Patch Set: Address code review comments. 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-2001 Lars Knoll <knoll@kde.org> 3 * 1999-2001 Lars Knoll <knoll@kde.org>
4 * 1999-2001 Antti Koivisto <koivisto@kde.org> 4 * 1999-2001 Antti Koivisto <koivisto@kde.org>
5 * 2000-2001 Simon Hausmann <hausmann@kde.org> 5 * 2000-2001 Simon Hausmann <hausmann@kde.org>
6 * 2000-2001 Dirk Mueller <mueller@kde.org> 6 * 2000-2001 Dirk Mueller <mueller@kde.org>
7 * 2000 Stefan Schimanski <1Stein@gmx.de> 7 * 2000 Stefan Schimanski <1Stein@gmx.de>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
9 * reserved. 9 * reserved.
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
74 class NavigationScheduler; 74 class NavigationScheduler;
75 class Node; 75 class Node;
76 class NodeTraversal; 76 class NodeTraversal;
77 class PerformanceMonitor; 77 class PerformanceMonitor;
78 template <typename Strategy> 78 template <typename Strategy>
79 class PositionWithAffinityTemplate; 79 class PositionWithAffinityTemplate;
80 class PluginData; 80 class PluginData;
81 class ScriptController; 81 class ScriptController;
82 class SpellChecker; 82 class SpellChecker;
83 class WebFrameScheduler; 83 class WebFrameScheduler;
84 class WebPluginContainerBase;
84 class WebURLLoader; 85 class WebURLLoader;
85 86
86 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<LocalFrame>; 87 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<LocalFrame>;
87 88
88 class CORE_EXPORT LocalFrame final : public Frame, 89 class CORE_EXPORT LocalFrame final : public Frame,
89 public Supplementable<LocalFrame> { 90 public Supplementable<LocalFrame> {
90 USING_GARBAGE_COLLECTED_MIXIN(LocalFrame); 91 USING_GARBAGE_COLLECTED_MIXIN(LocalFrame);
91 92
92 friend class LocalFrameTest; 93 friend class LocalFrameTest;
93 94
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 238
238 std::unique_ptr<WebURLLoader> CreateURLLoader(); 239 std::unique_ptr<WebURLLoader> CreateURLLoader();
239 240
240 using FrameInitCallback = void (*)(LocalFrame*); 241 using FrameInitCallback = void (*)(LocalFrame*);
241 // Allows for the registration of a callback that is invoked whenever a new 242 // Allows for the registration of a callback that is invoked whenever a new
242 // LocalFrame is initialized. Callbacks are executed in the order that they 243 // LocalFrame is initialized. Callbacks are executed in the order that they
243 // were added using registerInitializationCallback, and there are no checks 244 // were added using registerInitializationCallback, and there are no checks
244 // for adding a callback multiple times. 245 // for adding a callback multiple times.
245 static void RegisterInitializationCallback(FrameInitCallback); 246 static void RegisterInitializationCallback(FrameInitCallback);
246 247
248 // If the frame hosts a PluginDocument, this method returns the
249 // WebPluginContainerBase that hosts the plugin. If the provided node is a
250 // plugin, then it returns its WebPluginContainerBase. Otherwise, uses the
251 // currently focused element (if any).
haraken 2017/05/22 04:51:44 This looks like a weird semantics. Can we drop the
dcheng 2017/05/22 09:48:29 I agree it's a bit confusing (which is why I was h
slangley 2017/05/22 23:53:25 I added a TODO and will followup with a CL to addr
252 WebPluginContainerBase* GetWebPluginContainerBase(Node* = nullptr) const;
253
247 private: 254 private:
248 friend class FrameNavigationDisabler; 255 friend class FrameNavigationDisabler;
249 256
250 LocalFrame(LocalFrameClient*, 257 LocalFrame(LocalFrameClient*,
251 Page&, 258 Page&,
252 FrameOwner*, 259 FrameOwner*,
253 InterfaceProvider*, 260 InterfaceProvider*,
254 InterfaceRegistry*); 261 InterfaceRegistry*);
255 262
256 // Intentionally private to prevent redundant checks when the type is 263 // Intentionally private to prevent redundant checks when the type is
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 explicit ScopedFrameBlamer(LocalFrame*); 393 explicit ScopedFrameBlamer(LocalFrame*);
387 ~ScopedFrameBlamer(); 394 ~ScopedFrameBlamer();
388 395
389 private: 396 private:
390 Member<LocalFrame> frame_; 397 Member<LocalFrame> frame_;
391 }; 398 };
392 399
393 } // namespace blink 400 } // namespace blink
394 401
395 #endif // LocalFrame_h 402 #endif // LocalFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698