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

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

Issue 280833002: Re-land "Issue 191223007: Move touch CTM from X into Chrome" (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: adding missing file again Created 6 years, 7 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 | « ui/events/BUILD.gn ('k') | ui/events/event.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/event_types.h" 10 #include "base/event_types.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 465
466 virtual ~TouchEvent(); 466 virtual ~TouchEvent();
467 467
468 int touch_id() const { return touch_id_; } 468 int touch_id() const { return touch_id_; }
469 float radius_x() const { return radius_x_; } 469 float radius_x() const { return radius_x_; }
470 float radius_y() const { return radius_y_; } 470 float radius_y() const { return radius_y_; }
471 float rotation_angle() const { return rotation_angle_; } 471 float rotation_angle() const { return rotation_angle_; }
472 float force() const { return force_; } 472 float force() const { return force_; }
473 int source_device_id() const { return source_device_id_; } 473 int source_device_id() const { return source_device_id_; }
474 474
475 // Relocate the touch-point to a new |origin|.
476 // This is useful when touch event is in X Root Window coordinates,
477 // and it needs to be mapped into Aura Root Window coordinates.
478 void Relocate(const gfx::Point& origin);
479
480 // Used for unit tests. 475 // Used for unit tests.
481 void set_radius_x(const float r) { radius_x_ = r; } 476 void set_radius_x(const float r) { radius_x_ = r; }
482 void set_radius_y(const float r) { radius_y_ = r; } 477 void set_radius_y(const float r) { radius_y_ = r; }
483 void set_source_device_id(int source_device_id) { 478 void set_source_device_id(int source_device_id) {
484 source_device_id_ = source_device_id; 479 source_device_id_ = source_device_id;
485 } 480 }
486 481
487 // Overridden from LocatedEvent. 482 // Overridden from LocatedEvent.
488 virtual void UpdateForRootTransform( 483 virtual void UpdateForRootTransform(
489 const gfx::Transform& inverted_root_transform) OVERRIDE; 484 const gfx::Transform& inverted_root_transform) OVERRIDE;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 // The set of indices of ones in the binary representation of 682 // The set of indices of ones in the binary representation of
688 // touch_ids_bitfield_ is the set of touch_ids associate with this gesture. 683 // touch_ids_bitfield_ is the set of touch_ids associate with this gesture.
689 // This value is stored as a bitfield because the number of touch ids varies, 684 // This value is stored as a bitfield because the number of touch ids varies,
690 // but we currently don't need more than 32 touches at a time. 685 // but we currently don't need more than 32 touches at a time.
691 const unsigned int touch_ids_bitfield_; 686 const unsigned int touch_ids_bitfield_;
692 }; 687 };
693 688
694 } // namespace ui 689 } // namespace ui
695 690
696 #endif // UI_EVENTS_EVENT_H_ 691 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « ui/events/BUILD.gn ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698