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

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

Issue 191223007: Move touch CTM from X into Chrome (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework 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
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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 470
471 virtual ~TouchEvent(); 471 virtual ~TouchEvent();
472 472
473 int touch_id() const { return touch_id_; } 473 int touch_id() const { return touch_id_; }
474 float radius_x() const { return radius_x_; } 474 float radius_x() const { return radius_x_; }
475 float radius_y() const { return radius_y_; } 475 float radius_y() const { return radius_y_; }
476 float rotation_angle() const { return rotation_angle_; } 476 float rotation_angle() const { return rotation_angle_; }
477 float force() const { return force_; } 477 float force() const { return force_; }
478 int source_device_id() const { return source_device_id_; } 478 int source_device_id() const { return source_device_id_; }
479 479
480 // Relocate the touch-point to a new |origin|.
481 // This is useful when touch event is in X Root Window coordinates,
482 // and it needs to be mapped into Aura Root Window coordinates.
483 void Relocate(const gfx::Point& origin);
484
485 // Used for unit tests. 480 // Used for unit tests.
486 void set_radius_x(const float r) { radius_x_ = r; } 481 void set_radius_x(const float r) { radius_x_ = r; }
487 void set_radius_y(const float r) { radius_y_ = r; } 482 void set_radius_y(const float r) { radius_y_ = r; }
488 void set_source_device_id(int source_device_id) { 483 void set_source_device_id(int source_device_id) {
489 source_device_id_ = source_device_id; 484 source_device_id_ = source_device_id;
490 } 485 }
491 486
492 // Overridden from LocatedEvent. 487 // Overridden from LocatedEvent.
493 virtual void UpdateForRootTransform( 488 virtual void UpdateForRootTransform(
494 const gfx::Transform& inverted_root_transform) OVERRIDE; 489 const gfx::Transform& inverted_root_transform) OVERRIDE;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 // The set of indices of ones in the binary representation of 687 // The set of indices of ones in the binary representation of
693 // touch_ids_bitfield_ is the set of touch_ids associate with this gesture. 688 // touch_ids_bitfield_ is the set of touch_ids associate with this gesture.
694 // This value is stored as a bitfield because the number of touch ids varies, 689 // This value is stored as a bitfield because the number of touch ids varies,
695 // but we currently don't need more than 32 touches at a time. 690 // but we currently don't need more than 32 touches at a time.
696 const unsigned int touch_ids_bitfield_; 691 const unsigned int touch_ids_bitfield_;
697 }; 692 };
698 693
699 } // namespace ui 694 } // namespace ui
700 695
701 #endif // UI_EVENTS_EVENT_H_ 696 #endif // UI_EVENTS_EVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698