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