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

Side by Side Diff: ui/events/gesture_event_details.h

Issue 2049053003: Remove IPC::ParamTraits for ui::Event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
7 7
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "ui/events/event_constants.h" 11 #include "ui/events/event_constants.h"
12 #include "ui/events/events_base_export.h" 12 #include "ui/events/events_base_export.h"
13 #include "ui/gfx/geometry/rect.h" 13 #include "ui/gfx/geometry/rect.h"
14 #include "ui/gfx/geometry/rect_conversions.h" 14 #include "ui/gfx/geometry/rect_conversions.h"
15 15
16 namespace IPC {
17 template <class P> struct ParamTraits;
18 }
19
20 namespace ui { 16 namespace ui {
21 17
22 struct EVENTS_BASE_EXPORT GestureEventDetails { 18 struct EVENTS_BASE_EXPORT GestureEventDetails {
23 public: 19 public:
24 GestureEventDetails(); 20 GestureEventDetails();
25 explicit GestureEventDetails(EventType type); 21 explicit GestureEventDetails(EventType type);
26 GestureEventDetails(EventType type, float delta_x, float delta_y); 22 GestureEventDetails(EventType type, float delta_x, float delta_y);
27 23
28 // The caller is responsible for ensuring that the gesture data from |other| 24 // The caller is responsible for ensuring that the gesture data from |other|
29 // is compatible and sufficient for that expected by gestures of |type|. 25 // is compatible and sufficient for that expected by gestures of |type|.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 bool right; 191 bool right;
196 bool up; 192 bool up;
197 bool down; 193 bool down;
198 } swipe; 194 } swipe;
199 195
200 // Tap information must be set for ET_GESTURE_TAP, 196 // Tap information must be set for ET_GESTURE_TAP,
201 // ET_GESTURE_TAP_UNCONFIRMED, and ET_GESTURE_DOUBLE_TAP events. 197 // ET_GESTURE_TAP_UNCONFIRMED, and ET_GESTURE_DOUBLE_TAP events.
202 int tap_count; // TAP repeat count. 198 int tap_count; // TAP repeat count.
203 } data_; 199 } data_;
204 200
205 // For mojo native implementation of (de)serialization.
206 friend struct IPC::ParamTraits<ui::GestureEventDetails>;
207 friend struct IPC::ParamTraits<ui::GestureEventDetails::Details>;
208
209 GestureDeviceType device_type_; 201 GestureDeviceType device_type_;
210 202
211 int touch_points_; // Number of active touch points in the gesture. 203 int touch_points_; // Number of active touch points in the gesture.
212 204
213 // Bounding box is an axis-aligned rectangle that contains all the 205 // Bounding box is an axis-aligned rectangle that contains all the
214 // enclosing rectangles of the touch-points in the gesture. 206 // enclosing rectangles of the touch-points in the gesture.
215 gfx::RectF bounding_box_; 207 gfx::RectF bounding_box_;
216 }; 208 };
217 209
218 } // namespace ui 210 } // namespace ui
219 211
220 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ 212 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
OLDNEW
« components/mus/DEPS ('K') | « ui/events/event.cc ('k') | ui/events/keycodes/dom/dom_key.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698