| 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 11 matching lines...) Expand all Loading... |
| 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" |
| 34 #include "platform/heap/GarbageCollected.h" |
| 33 #include "platform/scroll/ScrollTypes.h" | 35 #include "platform/scroll/ScrollTypes.h" |
| 34 #include "public/platform/WebFocusType.h" | 36 #include "public/platform/WebFocusType.h" |
| 35 #include "v8/include/v8.h" | 37 #include "v8/include/v8.h" |
| 36 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
| 37 | 39 |
| 38 namespace blink { | 40 namespace blink { |
| 41 |
| 42 class Event; |
| 43 class FrameView; |
| 44 class ResourceResponse; |
| 39 class WebLayer; | 45 class WebLayer; |
| 40 } | |
| 41 | 46 |
| 42 namespace blink { | 47 class CORE_EXPORT PluginView : public GarbageCollectedFinalized<PluginView>, |
| 48 public FrameOrPlugin { |
| 49 public: |
| 50 virtual ~PluginView() {} |
| 43 | 51 |
| 44 class ResourceResponse; | 52 virtual void SetParent(FrameView*) = 0; |
| 45 | 53 virtual FrameView* Parent() const = 0; |
| 46 class CORE_EXPORT PluginView : public FrameViewBase { | 54 virtual void SetFocused(bool, WebFocusType) = 0; |
| 47 public: | 55 virtual void FrameRectsChanged() = 0; |
| 48 bool IsPluginView() const final { return true; } | 56 virtual void GeometryMayHaveChanged() = 0; |
| 49 virtual void SetFocused(bool, WebFocusType) {} | 57 virtual void HandleEvent(Event*) = 0; |
| 58 virtual void EventListenersRemoved() = 0; |
| 59 virtual bool IsPluginContainer() const { return false; } |
| 50 | 60 |
| 51 virtual WebLayer* PlatformLayer() const { return 0; } | 61 virtual WebLayer* PlatformLayer() const { return 0; } |
| 52 virtual v8::Local<v8::Object> ScriptableObject(v8::Isolate*) { | 62 virtual v8::Local<v8::Object> ScriptableObject(v8::Isolate*) { |
| 53 return v8::Local<v8::Object>(); | 63 return v8::Local<v8::Object>(); |
| 54 } | 64 } |
| 55 virtual bool WantsWheelEvents() { return false; } | 65 virtual bool WantsWheelEvents() { return false; } |
| 56 virtual bool SupportsKeyboardFocus() const { return false; } | 66 virtual bool SupportsKeyboardFocus() const { return false; } |
| 57 virtual bool SupportsInputMethod() const { return false; } | 67 virtual bool SupportsInputMethod() const { return false; } |
| 58 virtual bool CanProcessDrag() const { return false; } | 68 virtual bool CanProcessDrag() const { return false; } |
| 59 | 69 |
| 60 virtual void DidReceiveResponse(const ResourceResponse&) {} | 70 virtual void DidReceiveResponse(const ResourceResponse&) {} |
| 61 virtual void DidReceiveData(const char*, int) {} | 71 virtual void DidReceiveData(const char*, int) {} |
| 62 | 72 |
| 63 virtual void UpdateAllLifecyclePhases() {} | 73 virtual void UpdateAllLifecyclePhases() {} |
| 64 virtual void InvalidatePaintIfNeeded() {} | 74 virtual void InvalidatePaintIfNeeded() {} |
| 65 | 75 |
| 66 protected: | 76 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 67 PluginView() : FrameViewBase() {} | |
| 68 }; | 77 }; |
| 69 | 78 |
| 70 DEFINE_TYPE_CASTS(PluginView, | |
| 71 FrameViewBase, | |
| 72 frameViewBase, | |
| 73 frameViewBase->IsPluginView(), | |
| 74 frameViewBase.IsPluginView()); | |
| 75 | |
| 76 } // namespace blink | 79 } // namespace blink |
| 77 | 80 |
| 78 #endif // PluginView_h | 81 #endif // PluginView_h |
| OLD | NEW |