| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef PageWidgetDelegate_h | 31 #ifndef PageWidgetDelegate_h |
| 32 #define PageWidgetDelegate_h | 32 #define PageWidgetDelegate_h |
| 33 | 33 |
| 34 #include "public/platform/WebCanvas.h" | 34 #include "public/platform/WebCanvas.h" |
| 35 #include "public/web/WebInputEvent.h" | 35 #include "public/web/WebInputEvent.h" |
| 36 #include "public/web/WebWidget.h" | 36 #include "public/web/WebWidget.h" |
| 37 #include "web/WebExport.h" | |
| 38 #include "wtf/OwnPtr.h" | 37 #include "wtf/OwnPtr.h" |
| 39 | 38 |
| 40 namespace blink { | 39 namespace blink { |
| 41 | 40 |
| 42 class LocalFrame; | 41 class LocalFrame; |
| 43 class Page; | 42 class Page; |
| 44 class WebGestureEvent; | 43 class WebGestureEvent; |
| 45 class WebInputEvent; | 44 class WebInputEvent; |
| 46 class WebKeyboardEvent; | 45 class WebKeyboardEvent; |
| 47 class WebMouseEvent; | 46 class WebMouseEvent; |
| 48 class WebMouseWheelEvent; | 47 class WebMouseWheelEvent; |
| 49 class WebTouchEvent; | 48 class WebTouchEvent; |
| 50 | 49 |
| 51 class WEB_EXPORT PageWidgetEventHandler { | 50 class PageWidgetEventHandler { |
| 52 public: | 51 public: |
| 53 virtual void handleMouseMove(LocalFrame& mainFrame, const WebMouseEvent&); | 52 virtual void handleMouseMove(LocalFrame& mainFrame, const WebMouseEvent&); |
| 54 virtual void handleMouseLeave(LocalFrame& mainFrame, const WebMouseEvent&); | 53 virtual void handleMouseLeave(LocalFrame& mainFrame, const WebMouseEvent&); |
| 55 virtual void handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent&); | 54 virtual void handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent&); |
| 56 virtual void handleMouseUp(LocalFrame& mainFrame, const WebMouseEvent&); | 55 virtual void handleMouseUp(LocalFrame& mainFrame, const WebMouseEvent&); |
| 57 virtual WebInputEventResult handleMouseWheel(LocalFrame& mainFrame, const We
bMouseWheelEvent&); | 56 virtual WebInputEventResult handleMouseWheel(LocalFrame& mainFrame, const We
bMouseWheelEvent&); |
| 58 virtual WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) = 0; | 57 virtual WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) = 0; |
| 59 virtual WebInputEventResult handleCharEvent(const WebKeyboardEvent&) = 0; | 58 virtual WebInputEventResult handleCharEvent(const WebKeyboardEvent&) = 0; |
| 60 virtual WebInputEventResult handleGestureEvent(const WebGestureEvent&) = 0; | 59 virtual WebInputEventResult handleGestureEvent(const WebGestureEvent&) = 0; |
| 61 virtual WebInputEventResult handleTouchEvent(LocalFrame& mainFrame, const We
bTouchEvent&); | 60 virtual WebInputEventResult handleTouchEvent(LocalFrame& mainFrame, const We
bTouchEvent&); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 81 | 80 |
| 82 // See FIXME in the function body about nullptr |root|. | 81 // See FIXME in the function body about nullptr |root|. |
| 83 static WebInputEventResult handleInputEvent(PageWidgetEventHandler&, const W
ebInputEvent&, LocalFrame* root); | 82 static WebInputEventResult handleInputEvent(PageWidgetEventHandler&, const W
ebInputEvent&, LocalFrame* root); |
| 84 | 83 |
| 85 private: | 84 private: |
| 86 PageWidgetDelegate() { } | 85 PageWidgetDelegate() { } |
| 87 }; | 86 }; |
| 88 | 87 |
| 89 } // namespace blink | 88 } // namespace blink |
| 90 #endif | 89 #endif |
| OLD | NEW |