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

Side by Side Diff: third_party/WebKit/Source/web/WebInputEventConversion.h

Issue 2806223002: Use FrameView rather than FrameViewBase for WebInputEventConversion (Closed)
Patch Set: Created 3 years, 8 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
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 24 matching lines...) Expand all
35 #include "platform/scroll/ScrollTypes.h" 35 #include "platform/scroll/ScrollTypes.h"
36 #include "platform/wtf/Compiler.h" 36 #include "platform/wtf/Compiler.h"
37 #include "public/platform/WebInputEvent.h" 37 #include "public/platform/WebInputEvent.h"
38 #include "public/platform/WebKeyboardEvent.h" 38 #include "public/platform/WebKeyboardEvent.h"
39 #include "public/platform/WebMouseWheelEvent.h" 39 #include "public/platform/WebMouseWheelEvent.h"
40 #include "public/platform/WebTouchEvent.h" 40 #include "public/platform/WebTouchEvent.h"
41 #include "web/WebExport.h" 41 #include "web/WebExport.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 class FrameViewBase; 45 class FrameView;
46 class KeyboardEvent; 46 class KeyboardEvent;
47 class MouseEvent; 47 class MouseEvent;
48 class LayoutItem; 48 class LayoutItem;
49 class TouchEvent; 49 class TouchEvent;
50 class WebGestureEvent; 50 class WebGestureEvent;
51 class WebKeyboardEvent; 51 class WebKeyboardEvent;
52 52
53 // These classes are used to convert from WebInputEvent subclasses to 53 // These classes are used to convert from WebInputEvent subclasses to
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*, 64 WebMouseEventBuilder(const FrameView*, const LayoutItem, const MouseEvent&);
65 const LayoutItem, 65 WebMouseEventBuilder(const FrameView*, const LayoutItem, const TouchEvent&);
66 const MouseEvent&);
67 WebMouseEventBuilder(const FrameViewBase*,
68 const LayoutItem,
69 const TouchEvent&);
70 }; 66 };
71 67
72 // Converts a KeyboardEvent to a corresponding WebKeyboardEvent. 68 // Converts a KeyboardEvent to a corresponding WebKeyboardEvent.
73 // NOTE: For KeyboardEvent, this is only implemented for keydown, 69 // NOTE: For KeyboardEvent, this is only implemented for keydown,
74 // keyup, and keypress. If the event mapping fails, the event type will be set 70 // keyup, and keypress. If the event mapping fails, the event type will be set
75 // to Undefined. 71 // to Undefined.
76 class WEB_EXPORT WebKeyboardEventBuilder 72 class WEB_EXPORT WebKeyboardEventBuilder
77 : NON_EXPORTED_BASE(public WebKeyboardEvent) { 73 : NON_EXPORTED_BASE(public WebKeyboardEvent) {
78 public: 74 public:
79 WebKeyboardEventBuilder(const KeyboardEvent&); 75 WebKeyboardEventBuilder(const KeyboardEvent&);
80 }; 76 };
81 77
82 // Converts a TouchEvent to a corresponding WebTouchEvent. 78 // Converts a TouchEvent to a corresponding WebTouchEvent.
83 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points 79 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points
84 // exceeding that cap will be dropped. 80 // exceeding that cap will be dropped.
85 class WEB_EXPORT WebTouchEventBuilder 81 class WEB_EXPORT WebTouchEventBuilder
86 : NON_EXPORTED_BASE(public WebTouchEvent) { 82 : NON_EXPORTED_BASE(public WebTouchEvent) {
87 public: 83 public:
88 WebTouchEventBuilder(const LayoutItem, const TouchEvent&); 84 WebTouchEventBuilder(const LayoutItem, const TouchEvent&);
89 }; 85 };
90 86
91 // Return a new transformed WebGestureEvent by applying the Widget's scale 87 // Return a new transformed WebGestureEvent by applying the Widget's scale
92 // and translation. 88 // and translation.
93 WEB_EXPORT WebGestureEvent TransformWebGestureEvent(FrameViewBase*, 89 WEB_EXPORT WebGestureEvent TransformWebGestureEvent(FrameView*,
94 const WebGestureEvent&); 90 const WebGestureEvent&);
95 WEB_EXPORT WebMouseEvent TransformWebMouseEvent(FrameViewBase*, 91 WEB_EXPORT WebMouseEvent TransformWebMouseEvent(FrameView*,
96 const WebMouseEvent&); 92 const WebMouseEvent&);
97 93
98 WEB_EXPORT WebMouseWheelEvent 94 WEB_EXPORT WebMouseWheelEvent
99 TransformWebMouseWheelEvent(FrameViewBase*, const WebMouseWheelEvent&); 95 TransformWebMouseWheelEvent(FrameView*, const WebMouseWheelEvent&);
100 96
101 WEB_EXPORT WebTouchEvent TransformWebTouchEvent(FrameViewBase*, 97 WEB_EXPORT WebTouchEvent TransformWebTouchEvent(FrameView*,
102 const WebTouchEvent&); 98 const WebTouchEvent&);
103 99
104 Vector<WebMouseEvent> WEB_EXPORT 100 Vector<WebMouseEvent> WEB_EXPORT
105 TransformWebMouseEventVector(FrameViewBase*, 101 TransformWebMouseEventVector(FrameView*,
106 const std::vector<const WebInputEvent*>&); 102 const std::vector<const WebInputEvent*>&);
107 Vector<WebTouchEvent> WEB_EXPORT 103 Vector<WebTouchEvent> WEB_EXPORT
108 TransformWebTouchEventVector(FrameViewBase*, 104 TransformWebTouchEventVector(FrameView*,
109 const std::vector<const WebInputEvent*>&); 105 const std::vector<const WebInputEvent*>&);
110 106
111 } // namespace blink 107 } // namespace blink
112 108
113 #endif 109 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698