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

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

Issue 1617863002: Set the correct pressure for pointer events based on force (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the tests Created 4 years, 10 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 (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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698