| 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" |
| 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 // TODO(joelhockey): Remove this class. |
| 47 // The only implementation of this class is web/WebPluginContainerImpl. |
| 48 // It can be used directly. |
| 49 class CORE_EXPORT PluginView : public FrameOrPlugin { |
| 50 public: |
| 51 virtual ~PluginView() {} |
| 43 | 52 |
| 44 class ResourceResponse; | 53 virtual void SetParent(FrameView*) = 0; |
| 45 | 54 virtual FrameView* Parent() const = 0; |
| 46 class CORE_EXPORT PluginView : public FrameViewBase { | 55 virtual void SetParentVisible(bool) = 0; |
| 47 public: | 56 virtual void SetFocused(bool, WebFocusType) = 0; |
| 48 bool IsPluginView() const final { return true; } | 57 virtual void FrameRectsChanged() = 0; |
| 49 virtual void SetFocused(bool, WebFocusType) {} | 58 virtual void GeometryMayHaveChanged() = 0; |
| 59 virtual void HandleEvent(Event*) = 0; |
| 60 virtual void EventListenersRemoved() = 0; |
| 61 virtual bool IsPluginContainer() const { return false; } |
| 50 | 62 |
| 51 virtual WebLayer* PlatformLayer() const { return 0; } | 63 virtual WebLayer* PlatformLayer() const { return 0; } |
| 52 virtual v8::Local<v8::Object> ScriptableObject(v8::Isolate*) { | 64 virtual v8::Local<v8::Object> ScriptableObject(v8::Isolate*) { |
| 53 return v8::Local<v8::Object>(); | 65 return v8::Local<v8::Object>(); |
| 54 } | 66 } |
| 55 virtual bool WantsWheelEvents() { return false; } | 67 virtual bool WantsWheelEvents() { return false; } |
| 56 virtual bool SupportsKeyboardFocus() const { return false; } | 68 virtual bool SupportsKeyboardFocus() const { return false; } |
| 57 virtual bool SupportsInputMethod() const { return false; } | 69 virtual bool SupportsInputMethod() const { return false; } |
| 58 virtual bool CanProcessDrag() const { return false; } | 70 virtual bool CanProcessDrag() const { return false; } |
| 59 | 71 |
| 60 virtual void DidReceiveResponse(const ResourceResponse&) {} | 72 virtual void DidReceiveResponse(const ResourceResponse&) {} |
| 61 virtual void DidReceiveData(const char*, int) {} | 73 virtual void DidReceiveData(const char*, int) {} |
| 62 | 74 |
| 63 virtual void UpdateAllLifecyclePhases() {} | 75 virtual void UpdateAllLifecyclePhases() {} |
| 64 virtual void InvalidatePaintIfNeeded() {} | 76 virtual void InvalidatePaintIfNeeded() {} |
| 65 | |
| 66 protected: | |
| 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 |