Chromium Code Reviews| 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_BASE_EVENTS_EVENT_H_ | 5 #ifndef UI_BASE_EVENTS_EVENT_H_ |
| 6 #define UI_BASE_EVENTS_EVENT_H_ | 6 #define UI_BASE_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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 625 finger_count_(model.finger_count_){ | 625 finger_count_(model.finger_count_){ |
| 626 } | 626 } |
| 627 | 627 |
| 628 // Used for tests. | 628 // Used for tests. |
| 629 ScrollEvent(EventType type, | 629 ScrollEvent(EventType type, |
| 630 const gfx::Point& location, | 630 const gfx::Point& location, |
| 631 int flags, | 631 int flags, |
| 632 float x_offset, | 632 float x_offset, |
| 633 float y_offset); | 633 float y_offset); |
| 634 | 634 |
| 635 // Rescale the scroll event's offset value. | |
| 636 // This is useful in the multi-monitor setup where it needs to be scaled | |
| 637 // to provide a consistent user experience. | |
| 638 void Rescale(const float factor); | |
|
DaveMoore
2013/01/07 04:31:45
Nit: The naming of this is a bit strange. Isn't it
| |
| 639 | |
| 635 float x_offset() const { return x_offset_; } | 640 float x_offset() const { return x_offset_; } |
| 636 float y_offset() const { return y_offset_; } | 641 float y_offset() const { return y_offset_; } |
| 637 int finger_count() const { return finger_count_; } | 642 int finger_count() const { return finger_count_; } |
| 638 | 643 |
| 639 private: | 644 private: |
| 640 float x_offset_; | 645 float x_offset_; |
| 641 float y_offset_; | 646 float y_offset_; |
| 642 int finger_count_; | 647 int finger_count_; |
| 643 | 648 |
| 644 DISALLOW_COPY_AND_ASSIGN(ScrollEvent); | 649 DISALLOW_COPY_AND_ASSIGN(ScrollEvent); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 680 // This value is stored as a bitfield because the number of touch ids varies, | 685 // This value is stored as a bitfield because the number of touch ids varies, |
| 681 // but we currently don't need more than 32 touches at a time. | 686 // but we currently don't need more than 32 touches at a time. |
| 682 const unsigned int touch_ids_bitfield_; | 687 const unsigned int touch_ids_bitfield_; |
| 683 | 688 |
| 684 DISALLOW_COPY_AND_ASSIGN(GestureEvent); | 689 DISALLOW_COPY_AND_ASSIGN(GestureEvent); |
| 685 }; | 690 }; |
| 686 | 691 |
| 687 } // namespace ui | 692 } // namespace ui |
| 688 | 693 |
| 689 #endif // UI_BASE_EVENTS_EVENT_H_ | 694 #endif // UI_BASE_EVENTS_EVENT_H_ |
| OLD | NEW |