OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class ResourceResponse; | 43 class ResourceResponse; |
44 class WebLayer; | 44 class WebLayer; |
45 | 45 |
46 // TODO(joelhockey): Remove this class. | 46 // TODO(joelhockey): Remove this class. |
47 // The only implementation of this class is web/WebPluginContainerImpl. | 47 // The only implementation of this class is web/WebPluginContainerImpl. |
48 // It can be used directly. | 48 // It can be used directly. |
49 class CORE_EXPORT PluginView : public FrameOrPlugin { | 49 class CORE_EXPORT PluginView : public FrameOrPlugin { |
50 public: | 50 public: |
51 virtual ~PluginView() {} | 51 virtual ~PluginView() {} |
52 | 52 |
| 53 bool IsPluginView() const override { return true; } |
| 54 |
53 virtual void SetParent(FrameView*) = 0; | 55 virtual void SetParent(FrameView*) = 0; |
54 virtual FrameView* Parent() const = 0; | 56 virtual FrameView* Parent() const = 0; |
55 virtual void SetParentVisible(bool) = 0; | 57 virtual void SetParentVisible(bool) = 0; |
56 virtual void SetFocused(bool, WebFocusType) = 0; | 58 virtual void SetFocused(bool, WebFocusType) = 0; |
57 virtual void FrameRectsChanged() = 0; | 59 virtual void FrameRectsChanged() = 0; |
58 virtual void GeometryMayHaveChanged() = 0; | 60 virtual void GeometryMayHaveChanged() = 0; |
59 virtual void HandleEvent(Event*) = 0; | 61 virtual void HandleEvent(Event*) = 0; |
60 virtual void EventListenersRemoved() = 0; | 62 virtual void EventListenersRemoved() = 0; |
61 virtual bool IsPluginContainer() const { return false; } | 63 virtual bool IsPluginContainer() const { return false; } |
62 | 64 |
63 virtual WebLayer* PlatformLayer() const { return 0; } | 65 virtual WebLayer* PlatformLayer() const { return 0; } |
64 virtual v8::Local<v8::Object> ScriptableObject(v8::Isolate*) { | 66 virtual v8::Local<v8::Object> ScriptableObject(v8::Isolate*) { |
65 return v8::Local<v8::Object>(); | 67 return v8::Local<v8::Object>(); |
66 } | 68 } |
67 virtual bool WantsWheelEvents() { return false; } | 69 virtual bool WantsWheelEvents() { return false; } |
68 virtual bool SupportsKeyboardFocus() const { return false; } | 70 virtual bool SupportsKeyboardFocus() const { return false; } |
69 virtual bool SupportsInputMethod() const { return false; } | 71 virtual bool SupportsInputMethod() const { return false; } |
70 virtual bool CanProcessDrag() const { return false; } | 72 virtual bool CanProcessDrag() const { return false; } |
71 | 73 |
72 virtual void DidReceiveResponse(const ResourceResponse&) {} | 74 virtual void DidReceiveResponse(const ResourceResponse&) {} |
73 virtual void DidReceiveData(const char*, int) {} | 75 virtual void DidReceiveData(const char*, int) {} |
74 | 76 |
75 virtual void UpdateAllLifecyclePhases() {} | 77 virtual void UpdateAllLifecyclePhases() {} |
76 virtual void InvalidatePaintIfNeeded() {} | 78 virtual void InvalidatePaintIfNeeded() {} |
77 }; | 79 }; |
78 | 80 |
| 81 DEFINE_TYPE_CASTS(PluginView, |
| 82 FrameOrPlugin, |
| 83 frame_or_plugin, |
| 84 frame_or_plugin->IsPluginView(), |
| 85 frame_or_plugin.IsPluginView()); |
| 86 |
79 } // namespace blink | 87 } // namespace blink |
80 | 88 |
81 #endif // PluginView_h | 89 #endif // PluginView_h |
OLD | NEW |