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

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

Issue 11743013: Scaling scroll/fling events in multi-monitor setup (Closed) Base URL: https://chromium.googlesource.com/chromium/src@git-svn
Patch Set: Fix lint errors Created 7 years, 11 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 | « ash/shell.cc ('k') | ui/base/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_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
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
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_
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ui/base/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698