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

Side by Side Diff: third_party/WebKit/Source/core/plugins/PluginView.h

Issue 2814643003: Remove FrameViewBase as base class of PluginView. (Closed)
Patch Set: Merge after dependency CL Created 3 years, 8 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) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 11 matching lines...) Expand all
22 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25 * DAMAGE. 25 * DAMAGE.
26 */ 26 */
27 27
28 #ifndef PluginView_h 28 #ifndef PluginView_h
29 #define PluginView_h 29 #define PluginView_h
30 30
31 #include "core/CoreExport.h" 31 #include "core/CoreExport.h"
32 #include "platform/FrameViewBase.h" 32 #include "core/frame/FrameOrPlugin.h"
33 #include "platform/geometry/IntRect.h"
33 #include "platform/scroll/ScrollTypes.h" 34 #include "platform/scroll/ScrollTypes.h"
34 #include "public/platform/WebFocusType.h" 35 #include "public/platform/WebFocusType.h"
35 #include "v8/include/v8.h" 36 #include "v8/include/v8.h"
36 #include "wtf/text/WTFString.h" 37 #include "wtf/text/WTFString.h"
37 38
38 namespace blink { 39 namespace blink {
40
41 class Event;
42 class FrameView;
43 class ResourceResponse;
39 class WebLayer; 44 class WebLayer;
40 }
41 45
42 namespace blink { 46 class CORE_EXPORT PluginView : public FrameOrPlugin {
47 public:
48 virtual ~PluginView() {}
43 49
44 class ResourceResponse; 50 virtual void SetParent(FrameView*) = 0;
45 51 virtual FrameView* Parent() const = 0;
46 class CORE_EXPORT PluginView : public FrameViewBase { 52 virtual void SetParentVisible(bool) = 0;
47 public: 53 virtual void SetFocused(bool, WebFocusType) = 0;
48 bool IsPluginView() const final { return true; } 54 virtual void FrameRectsChanged() = 0;
49 virtual void SetFocused(bool, WebFocusType) {} 55 virtual void GeometryMayHaveChanged() = 0;
56 virtual void HandleEvent(Event*) = 0;
57 virtual void EventListenersRemoved() = 0;
58 virtual bool IsPluginContainer() const { return false; }
dcheng 2017/04/17 21:09:06 We may want to consider removing this as well (the
joelhockey 2017/04/18 00:42:41 +1. There is only a single implementation, so I a
dcheng 2017/04/18 00:56:31 OK, please add a TODO since we're not doing it in
joelhockey 2017/04/18 01:05:16 Done
50 59
51 virtual WebLayer* PlatformLayer() const { return 0; } 60 virtual WebLayer* PlatformLayer() const { return 0; }
52 virtual v8::Local<v8::Object> ScriptableObject(v8::Isolate*) { 61 virtual v8::Local<v8::Object> ScriptableObject(v8::Isolate*) {
53 return v8::Local<v8::Object>(); 62 return v8::Local<v8::Object>();
54 } 63 }
55 virtual bool WantsWheelEvents() { return false; } 64 virtual bool WantsWheelEvents() { return false; }
56 virtual bool SupportsKeyboardFocus() const { return false; } 65 virtual bool SupportsKeyboardFocus() const { return false; }
57 virtual bool SupportsInputMethod() const { return false; } 66 virtual bool SupportsInputMethod() const { return false; }
58 virtual bool CanProcessDrag() const { return false; } 67 virtual bool CanProcessDrag() const { return false; }
59 68
60 virtual void DidReceiveResponse(const ResourceResponse&) {} 69 virtual void DidReceiveResponse(const ResourceResponse&) {}
61 virtual void DidReceiveData(const char*, int) {} 70 virtual void DidReceiveData(const char*, int) {}
62 71
63 virtual void UpdateAllLifecyclePhases() {} 72 virtual void UpdateAllLifecyclePhases() {}
64 virtual void InvalidatePaintIfNeeded() {} 73 virtual void InvalidatePaintIfNeeded() {}
65
66 protected:
67 PluginView() : FrameViewBase() {}
68 }; 74 };
69 75
70 DEFINE_TYPE_CASTS(PluginView,
71 FrameViewBase,
72 frameViewBase,
73 frameViewBase->IsPluginView(),
74 frameViewBase.IsPluginView());
75
76 } // namespace blink 76 } // namespace blink
77 77
78 #endif // PluginView_h 78 #endif // PluginView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698