OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // corresponding WebCore events. | 54 // corresponding WebCore events. |
55 | 55 |
56 | 56 |
57 class WEB_EXPORT WebMouseEventBuilder | 57 class WEB_EXPORT WebMouseEventBuilder |
58 : NON_EXPORTED_BASE(public WebMouseEvent) { | 58 : NON_EXPORTED_BASE(public WebMouseEvent) { |
59 public: | 59 public: |
60 // Converts a MouseEvent to a corresponding WebMouseEvent. | 60 // Converts a MouseEvent to a corresponding WebMouseEvent. |
61 // NOTE: This is only implemented for mousemove, mouseover, mouseout, | 61 // NOTE: This is only implemented for mousemove, mouseover, mouseout, |
62 // mousedown and mouseup. If the event mapping fails, the event type will | 62 // mousedown and mouseup. If the event mapping fails, the event type will |
63 // be set to Undefined. | 63 // be set to Undefined. |
64 WebMouseEventBuilder(const FrameViewBase*, const LayoutItem, const MouseEvent&
); | 64 WebMouseEventBuilder(const FrameViewBase*, |
65 WebMouseEventBuilder(const FrameViewBase*, const LayoutItem, const TouchEvent&
); | 65 const LayoutItem, |
| 66 const MouseEvent&); |
| 67 WebMouseEventBuilder(const FrameViewBase*, |
| 68 const LayoutItem, |
| 69 const TouchEvent&); |
66 }; | 70 }; |
67 | 71 |
68 // Converts a KeyboardEvent to a corresponding WebKeyboardEvent. | 72 // Converts a KeyboardEvent to a corresponding WebKeyboardEvent. |
69 // NOTE: For KeyboardEvent, this is only implemented for keydown, | 73 // NOTE: For KeyboardEvent, this is only implemented for keydown, |
70 // keyup, and keypress. If the event mapping fails, the event type will be set | 74 // keyup, and keypress. If the event mapping fails, the event type will be set |
71 // to Undefined. | 75 // to Undefined. |
72 class WEB_EXPORT WebKeyboardEventBuilder | 76 class WEB_EXPORT WebKeyboardEventBuilder |
73 : NON_EXPORTED_BASE(public WebKeyboardEvent) { | 77 : NON_EXPORTED_BASE(public WebKeyboardEvent) { |
74 public: | 78 public: |
75 WebKeyboardEventBuilder(const KeyboardEvent&); | 79 WebKeyboardEventBuilder(const KeyboardEvent&); |
76 }; | 80 }; |
77 | 81 |
78 // Converts a TouchEvent to a corresponding WebTouchEvent. | 82 // Converts a TouchEvent to a corresponding WebTouchEvent. |
79 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points | 83 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points |
80 // exceeding that cap will be dropped. | 84 // exceeding that cap will be dropped. |
81 class WEB_EXPORT WebTouchEventBuilder | 85 class WEB_EXPORT WebTouchEventBuilder |
82 : NON_EXPORTED_BASE(public WebTouchEvent) { | 86 : NON_EXPORTED_BASE(public WebTouchEvent) { |
83 public: | 87 public: |
84 WebTouchEventBuilder(const LayoutItem, const TouchEvent&); | 88 WebTouchEventBuilder(const LayoutItem, const TouchEvent&); |
85 }; | 89 }; |
86 | 90 |
87 // Return a new transformed WebGestureEvent by applying the Widget's scale | 91 // Return a new transformed WebGestureEvent by applying the Widget's scale |
88 // and translation. | 92 // and translation. |
89 WEB_EXPORT WebGestureEvent TransformWebGestureEvent(FrameViewBase*, | 93 WEB_EXPORT WebGestureEvent TransformWebGestureEvent(FrameViewBase*, |
90 const WebGestureEvent&); | 94 const WebGestureEvent&); |
91 WEB_EXPORT WebMouseEvent TransformWebMouseEvent(FrameViewBase*, const WebMouseEv
ent&); | 95 WEB_EXPORT WebMouseEvent TransformWebMouseEvent(FrameViewBase*, |
| 96 const WebMouseEvent&); |
92 | 97 |
93 WEB_EXPORT WebMouseWheelEvent | 98 WEB_EXPORT WebMouseWheelEvent |
94 TransformWebMouseWheelEvent(FrameViewBase*, const WebMouseWheelEvent&); | 99 TransformWebMouseWheelEvent(FrameViewBase*, const WebMouseWheelEvent&); |
95 | 100 |
96 WEB_EXPORT WebTouchEvent TransformWebTouchEvent(FrameViewBase*, const WebTouchEv
ent&); | 101 WEB_EXPORT WebTouchEvent TransformWebTouchEvent(FrameViewBase*, |
| 102 const WebTouchEvent&); |
97 | 103 |
98 Vector<WebMouseEvent> WEB_EXPORT | 104 Vector<WebMouseEvent> WEB_EXPORT |
99 TransformWebMouseEventVector(FrameViewBase*, const std::vector<const WebInputEve
nt*>&); | 105 TransformWebMouseEventVector(FrameViewBase*, |
| 106 const std::vector<const WebInputEvent*>&); |
100 Vector<WebTouchEvent> WEB_EXPORT | 107 Vector<WebTouchEvent> WEB_EXPORT |
101 TransformWebTouchEventVector(FrameViewBase*, const std::vector<const WebInputEve
nt*>&); | 108 TransformWebTouchEventVector(FrameViewBase*, |
| 109 const std::vector<const WebInputEvent*>&); |
102 | 110 |
103 } // namespace blink | 111 } // namespace blink |
104 | 112 |
105 #endif | 113 #endif |
OLD | NEW |