OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EVENT_H_ | 5 #ifndef UI_EVENTS_EVENT_H_ |
6 #define UI_EVENTS_EVENT_H_ | 6 #define UI_EVENTS_EVENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 // rotations, animations and skews. | 324 // rotations, animations and skews. |
325 gfx::PointF root_location_; | 325 gfx::PointF root_location_; |
326 }; | 326 }; |
327 | 327 |
328 // Structure for handling common fields between touch and mouse to support | 328 // Structure for handling common fields between touch and mouse to support |
329 // PointerEvents API. | 329 // PointerEvents API. |
330 class EVENTS_EXPORT PointerDetails { | 330 class EVENTS_EXPORT PointerDetails { |
331 public: | 331 public: |
332 PointerDetails() {} | 332 PointerDetails() {} |
333 explicit PointerDetails(EventPointerType pointer_type) | 333 explicit PointerDetails(EventPointerType pointer_type) |
334 : pointer_type_(pointer_type) {} | 334 : pointer_type_(pointer_type), |
| 335 force_(std::numeric_limits<float>::quiet_NaN()) {} |
335 PointerDetails(EventPointerType pointer_type, | 336 PointerDetails(EventPointerType pointer_type, |
336 float radius_x, | 337 float radius_x, |
337 float radius_y, | 338 float radius_y, |
338 float force, | 339 float force, |
339 float tilt_x, | 340 float tilt_x, |
340 float tilt_y) | 341 float tilt_y) |
341 : pointer_type_(pointer_type), | 342 : pointer_type_(pointer_type), |
342 radius_x_(radius_x), | 343 radius_x_(radius_x), |
343 radius_y_(radius_y), | 344 radius_y_(radius_y), |
344 force_(force), | 345 force_(force), |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 | 916 |
916 const GestureEventDetails& details() const { return details_; } | 917 const GestureEventDetails& details() const { return details_; } |
917 | 918 |
918 private: | 919 private: |
919 GestureEventDetails details_; | 920 GestureEventDetails details_; |
920 }; | 921 }; |
921 | 922 |
922 } // namespace ui | 923 } // namespace ui |
923 | 924 |
924 #endif // UI_EVENTS_EVENT_H_ | 925 #endif // UI_EVENTS_EVENT_H_ |
OLD | NEW |