Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(794)

Side by Side Diff: sky/engine/web/WebInputEventConversion.h

Issue 874823002: Move GestureEvent to NewEventDispatcher (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Build fixes Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/public/web/WebWidgetClient.h ('k') | sky/engine/web/WebInputEventConversion.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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 SKY_ENGINE_WEB_WEBINPUTEVENTCONVERSION_H_ 31 #ifndef SKY_ENGINE_WEB_WEBINPUTEVENTCONVERSION_H_
32 #define SKY_ENGINE_WEB_WEBINPUTEVENTCONVERSION_H_ 32 #define SKY_ENGINE_WEB_WEBINPUTEVENTCONVERSION_H_
33 33
34 #include "sky/engine/platform/PlatformGestureEvent.h"
35 #include "sky/engine/platform/PlatformKeyboardEvent.h" 34 #include "sky/engine/platform/PlatformKeyboardEvent.h"
36 #include "sky/engine/public/platform/WebInputEvent.h" 35 #include "sky/engine/public/platform/WebInputEvent.h"
37 36
38 namespace blink { 37 namespace blink {
39 38
40 class GestureEvent;
41 class KeyboardEvent; 39 class KeyboardEvent;
42 class RenderObject; 40 class RenderObject;
43 class WebKeyboardEvent; 41 class WebKeyboardEvent;
44 class WebGestureEvent;
45 class Widget; 42 class Widget;
46 43
47 // These classes are used to convert from WebInputEvent subclasses to 44 // These classes are used to convert from WebInputEvent subclasses to
48 // corresponding WebCore events. 45 // corresponding WebCore events.
49 46
50 class PlatformGestureEventBuilder : public PlatformGestureEvent {
51 public:
52 PlatformGestureEventBuilder(Widget*, const WebGestureEvent&);
53 };
54
55 class PlatformKeyboardEventBuilder : public PlatformKeyboardEvent { 47 class PlatformKeyboardEventBuilder : public PlatformKeyboardEvent {
56 public: 48 public:
57 PlatformKeyboardEventBuilder(const WebKeyboardEvent&); 49 PlatformKeyboardEventBuilder(const WebKeyboardEvent&);
58 void setKeyType(Type); 50 void setKeyType(Type);
59 bool isCharacterKey() const; 51 bool isCharacterKey() const;
60 }; 52 };
61 53
62 // Converts a KeyboardEvent or PlatformKeyboardEvent to a 54 // Converts a KeyboardEvent or PlatformKeyboardEvent to a
63 // corresponding WebKeyboardEvent. 55 // corresponding WebKeyboardEvent.
64 // NOTE: For KeyboardEvent, this is only implemented for keydown, 56 // NOTE: For KeyboardEvent, this is only implemented for keydown,
65 // keyup, and keypress. If the event mapping fails, the event type will be set 57 // keyup, and keypress. If the event mapping fails, the event type will be set
66 // to Undefined. 58 // to Undefined.
67 class WebKeyboardEventBuilder : public WebKeyboardEvent { 59 class WebKeyboardEventBuilder : public WebKeyboardEvent {
68 public: 60 public:
69 WebKeyboardEventBuilder(const KeyboardEvent&); 61 WebKeyboardEventBuilder(const KeyboardEvent&);
70 WebKeyboardEventBuilder(const PlatformKeyboardEvent&); 62 WebKeyboardEventBuilder(const PlatformKeyboardEvent&);
71 }; 63 };
72 64
73 // Converts GestureEvent to a corresponding WebGestureEvent.
74 // NOTE: If event mapping fails, the type will be set to Undefined.
75 class WebGestureEventBuilder : public WebGestureEvent {
76 public:
77 WebGestureEventBuilder(const Widget*, const RenderObject*, const GestureEven t&);
78 };
79
80 } // namespace blink 65 } // namespace blink
81 66
82 #endif // SKY_ENGINE_WEB_WEBINPUTEVENTCONVERSION_H_ 67 #endif // SKY_ENGINE_WEB_WEBINPUTEVENTCONVERSION_H_
OLDNEW
« no previous file with comments | « sky/engine/public/web/WebWidgetClient.h ('k') | sky/engine/web/WebInputEventConversion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698