OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * 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 15 matching lines...) Expand all Loading... |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #ifndef WebPlugin_h | 32 #ifndef WebPlugin_h |
33 #define WebPlugin_h | 33 #define WebPlugin_h |
34 | 34 |
35 #include "../platform/WebCanvas.h" | 35 #include "../platform/WebCanvas.h" |
| 36 #include "../platform/WebFocusType.h" |
36 #include "../platform/WebString.h" | 37 #include "../platform/WebString.h" |
37 #include "../platform/WebURL.h" | 38 #include "../platform/WebURL.h" |
38 #include "WebDragOperation.h" | 39 #include "WebDragOperation.h" |
39 #include "WebDragStatus.h" | 40 #include "WebDragStatus.h" |
40 #include "WebWidget.h" | 41 #include "WebWidget.h" |
41 #include <v8.h> | 42 #include <v8.h> |
42 | 43 |
43 struct NPObject; | 44 struct NPObject; |
44 struct _NPP; | 45 struct _NPP; |
45 | 46 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 87 |
87 virtual bool canProcessDrag() const { return false; } | 88 virtual bool canProcessDrag() const { return false; } |
88 | 89 |
89 virtual void paint(WebCanvas*, const WebRect&) = 0; | 90 virtual void paint(WebCanvas*, const WebRect&) = 0; |
90 | 91 |
91 // Coordinates are relative to the containing window. | 92 // Coordinates are relative to the containing window. |
92 virtual void updateGeometry( | 93 virtual void updateGeometry( |
93 const WebRect& frameRect, const WebRect& clipRect, | 94 const WebRect& frameRect, const WebRect& clipRect, |
94 const WebVector<WebRect>& cutOutsRects, bool isVisible) = 0; | 95 const WebVector<WebRect>& cutOutsRects, bool isVisible) = 0; |
95 | 96 |
96 virtual void updateFocus(bool) = 0; | 97 // FIXME: Remove this once the Blink embedder has been updated to use |
| 98 // the new version of updateFocus. |
| 99 virtual void updateFocus(bool focused) { } |
| 100 |
| 101 virtual void updateFocus(bool focused, WebFocusType) |
| 102 { |
| 103 updateFocus(focused); |
| 104 } |
| 105 |
97 virtual void updateVisibility(bool) = 0; | 106 virtual void updateVisibility(bool) = 0; |
98 | 107 |
99 virtual bool acceptsInputEvents() = 0; | 108 virtual bool acceptsInputEvents() = 0; |
100 virtual bool handleInputEvent(const WebInputEvent&, WebCursorInfo&) = 0; | 109 virtual bool handleInputEvent(const WebInputEvent&, WebCursorInfo&) = 0; |
101 | 110 |
102 virtual bool handleDragStatusUpdate(WebDragStatus, const WebDragData&, WebDr
agOperationsMask, const WebPoint& position, const WebPoint& screenPosition) { re
turn false; } | 111 virtual bool handleDragStatusUpdate(WebDragStatus, const WebDragData&, WebDr
agOperationsMask, const WebPoint& position, const WebPoint& screenPosition) { re
turn false; } |
103 | 112 |
104 virtual void didReceiveResponse(const WebURLResponse&) = 0; | 113 virtual void didReceiveResponse(const WebURLResponse&) = 0; |
105 virtual void didReceiveData(const char* data, int dataLength) = 0; | 114 virtual void didReceiveData(const char* data, int dataLength) = 0; |
106 virtual void didFinishLoading() = 0; | 115 virtual void didFinishLoading() = 0; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 virtual bool isPlaceholder() { return true; } | 187 virtual bool isPlaceholder() { return true; } |
179 virtual bool shouldPersist() const { return false; } | 188 virtual bool shouldPersist() const { return false; } |
180 | 189 |
181 protected: | 190 protected: |
182 ~WebPlugin() { } | 191 ~WebPlugin() { } |
183 }; | 192 }; |
184 | 193 |
185 } // namespace blink | 194 } // namespace blink |
186 | 195 |
187 #endif | 196 #endif |
OLD | NEW |