| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 class WebMouseEvent; | 46 class WebMouseEvent; |
| 47 class WebMouseWheelEvent; | 47 class WebMouseWheelEvent; |
| 48 class WebTouchEvent; | 48 class WebTouchEvent; |
| 49 | 49 |
| 50 class PageWidgetEventHandler { | 50 class PageWidgetEventHandler { |
| 51 public: | 51 public: |
| 52 virtual void handleMouseMove(LocalFrame& mainFrame, const WebMouseEvent&); | 52 virtual void handleMouseMove(LocalFrame& mainFrame, const WebMouseEvent&); |
| 53 virtual void handleMouseLeave(LocalFrame& mainFrame, const WebMouseEvent&); | 53 virtual void handleMouseLeave(LocalFrame& mainFrame, const WebMouseEvent&); |
| 54 virtual void handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent&); | 54 virtual void handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent&); |
| 55 virtual void handleMouseUp(LocalFrame& mainFrame, const WebMouseEvent&); | 55 virtual void handleMouseUp(LocalFrame& mainFrame, const WebMouseEvent&); |
| 56 virtual bool handleMouseWheel(LocalFrame& mainFrame, const WebMouseWheelEven
t&); | 56 virtual WebInputEventResult handleMouseWheel(LocalFrame& mainFrame, const We
bMouseWheelEvent&); |
| 57 virtual bool handleKeyEvent(const WebKeyboardEvent&) = 0; | 57 virtual WebInputEventResult handleKeyEvent(const WebKeyboardEvent&) = 0; |
| 58 virtual bool handleCharEvent(const WebKeyboardEvent&) = 0; | 58 virtual WebInputEventResult handleCharEvent(const WebKeyboardEvent&) = 0; |
| 59 virtual bool handleGestureEvent(const WebGestureEvent&) = 0; | 59 virtual WebInputEventResult handleGestureEvent(const WebGestureEvent&) = 0; |
| 60 virtual bool handleTouchEvent(LocalFrame& mainFrame, const WebTouchEvent&); | 60 virtual WebInputEventResult handleTouchEvent(LocalFrame& mainFrame, const We
bTouchEvent&); |
| 61 virtual ~PageWidgetEventHandler() { } | 61 virtual ~PageWidgetEventHandler() { } |
| 62 protected: | 62 protected: |
| 63 const char* inputTypeToName(WebInputEvent::Type); | 63 const char* inputTypeToName(WebInputEvent::Type); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 | 66 |
| 67 // Common implementation of WebViewImpl and WebPagePopupImpl. | 67 // Common implementation of WebViewImpl and WebPagePopupImpl. |
| 68 class PageWidgetDelegate { | 68 class PageWidgetDelegate { |
| 69 public: | 69 public: |
| 70 static void animate(Page&, double monotonicFrameBeginTime); | 70 static void animate(Page&, double monotonicFrameBeginTime); |
| 71 | 71 |
| 72 // For the following methods, the |root| argument indicates a root localFram
e from which | 72 // For the following methods, the |root| argument indicates a root localFram
e from which |
| 73 // to start performing the specified operation. | 73 // to start performing the specified operation. |
| 74 | 74 |
| 75 // See documents of methods with the same names in FrameView class. | 75 // See documents of methods with the same names in FrameView class. |
| 76 static void updateLifecycleToCompositingCleanPlusScrolling(Page&, LocalFrame
& root); | 76 static void updateLifecycleToCompositingCleanPlusScrolling(Page&, LocalFrame
& root); |
| 77 static void updateAllLifecyclePhases(Page&, LocalFrame& root); | 77 static void updateAllLifecyclePhases(Page&, LocalFrame& root); |
| 78 | 78 |
| 79 static void paint(Page&, WebCanvas*, const WebRect&, LocalFrame& root); | 79 static void paint(Page&, WebCanvas*, const WebRect&, LocalFrame& root); |
| 80 static void paintIgnoringCompositing(Page&, WebCanvas*, const WebRect&, Loca
lFrame& root); | 80 static void paintIgnoringCompositing(Page&, WebCanvas*, const WebRect&, Loca
lFrame& root); |
| 81 | 81 |
| 82 // See FIXME in the function body about nullptr |root|. | 82 // See FIXME in the function body about nullptr |root|. |
| 83 static bool handleInputEvent(PageWidgetEventHandler&, const WebInputEvent&,
LocalFrame* root); | 83 static WebInputEventResult handleInputEvent(PageWidgetEventHandler&, const W
ebInputEvent&, LocalFrame* root); |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 PageWidgetDelegate() { } | 86 PageWidgetDelegate() { } |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 } | 89 } |
| 90 #endif | 90 #endif |
| OLD | NEW |