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

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

Issue 2720133002: Make pinch zoom work on chromeos by setting touch id correctly (Closed)
Patch Set: pinch zoom Created 3 years, 9 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 | « no previous file | 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 // that was released. 571 // that was released.
572 // NOTE: during a press and release flags() contains the complete set of 572 // NOTE: during a press and release flags() contains the complete set of
573 // flags. Use this to determine the button that was pressed or released. 573 // flags. Use this to determine the button that was pressed or released.
574 int changed_button_flags() const { return changed_button_flags_; } 574 int changed_button_flags() const { return changed_button_flags_; }
575 575
576 // Updates the button that changed. 576 // Updates the button that changed.
577 void set_changed_button_flags(int flags) { changed_button_flags_ = flags; } 577 void set_changed_button_flags(int flags) { changed_button_flags_ = flags; }
578 578
579 // Event details common to MouseEvent and TouchEvent. 579 // Event details common to MouseEvent and TouchEvent.
580 const PointerDetails& pointer_details() const { return pointer_details_; } 580 const PointerDetails& pointer_details() const { return pointer_details_; }
581 void set_pointer_details(const PointerDetails& details) { 581 void set_pointer_details(const PointerDetails& details);
582 pointer_details_ = details;
583 }
584 582
585 private: 583 private:
586 FRIEND_TEST_ALL_PREFIXES(EventTest, DoubleClickRequiresRelease); 584 FRIEND_TEST_ALL_PREFIXES(EventTest, DoubleClickRequiresRelease);
587 FRIEND_TEST_ALL_PREFIXES(EventTest, SingleClickRightLeft); 585 FRIEND_TEST_ALL_PREFIXES(EventTest, SingleClickRightLeft);
588 586
589 // Returns the repeat count based on the previous mouse click, if it is 587 // Returns the repeat count based on the previous mouse click, if it is
590 // recent enough and within a small enough distance. 588 // recent enough and within a small enough distance.
591 static int GetRepeatCount(const MouseEvent& click_event); 589 static int GetRepeatCount(const MouseEvent& click_event);
592 590
593 // Resets the last_click_event_ for unit tests. 591 // Resets the last_click_event_ for unit tests.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 const gfx::Transform& inverted_root_transform) override; 701 const gfx::Transform& inverted_root_transform) override;
704 702
705 // Marks the event as not participating in synchronous gesture recognition. 703 // Marks the event as not participating in synchronous gesture recognition.
706 void DisableSynchronousHandling(); 704 void DisableSynchronousHandling();
707 bool synchronous_handling_disabled() const { 705 bool synchronous_handling_disabled() const {
708 return !!(result() & ER_DISABLE_SYNC_HANDLING); 706 return !!(result() & ER_DISABLE_SYNC_HANDLING);
709 } 707 }
710 708
711 // Event details common to MouseEvent and TouchEvent. 709 // Event details common to MouseEvent and TouchEvent.
712 const PointerDetails& pointer_details() const { return pointer_details_; } 710 const PointerDetails& pointer_details() const { return pointer_details_; }
713 void set_pointer_details(const PointerDetails& pointer_details) { 711 void set_pointer_details(const PointerDetails& pointer_details);
714 pointer_details_ = pointer_details;
715 }
716 712
717 private: 713 private:
718 // Adjusts rotation_angle_ to within the acceptable range. 714 // Adjusts rotation_angle_ to within the acceptable range.
719 void FixRotationAngle(); 715 void FixRotationAngle();
720 716
721 // A unique identifier for the touch event. 717 // A unique identifier for the touch event.
722 uint32_t unique_event_id_; 718 uint32_t unique_event_id_;
723 719
724 // Clockwise angle (in degrees) of the major axis from the X axis. Must be 720 // Clockwise angle (in degrees) of the major axis from the X axis. Must be
725 // less than 180 and non-negative. 721 // less than 180 and non-negative.
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 // dispatched. This field gets a non-zero value only for gestures that are 1036 // dispatched. This field gets a non-zero value only for gestures that are
1041 // released through TouchDispositionGestureFilter::SendGesture. The gesture 1037 // released through TouchDispositionGestureFilter::SendGesture. The gesture
1042 // events that aren't fired directly in response to processing a touch-event 1038 // events that aren't fired directly in response to processing a touch-event
1043 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. 1039 // (e.g. timer fired ones), this id is zero. See crbug.com/618738.
1044 uint32_t unique_touch_event_id_; 1040 uint32_t unique_touch_event_id_;
1045 }; 1041 };
1046 1042
1047 } // namespace ui 1043 } // namespace ui
1048 1044
1049 #endif // UI_EVENTS_EVENT_H_ 1045 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698