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

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

Issue 2287403002: Create MouseWheelEvent directly instead of through MouseEvent. (Closed)
Patch Set: test Created 4 years, 3 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 EventType type, 478 EventType type,
479 int flags) 479 int flags)
480 : LocatedEvent(model, source, target), 480 : LocatedEvent(model, source, target),
481 changed_button_flags_(model.changed_button_flags_), 481 changed_button_flags_(model.changed_button_flags_),
482 pointer_details_(model.pointer_details_) { 482 pointer_details_(model.pointer_details_) {
483 SetType(type); 483 SetType(type);
484 set_flags(flags); 484 set_flags(flags);
485 } 485 }
486 486
487 // Used for synthetic events in testing, gesture recognizer and Ozone 487 // Used for synthetic events in testing, gesture recognizer and Ozone
488 // Note: Use the ctor for MouseWheelEvent if type is ET_MOUSEWHEEL.
488 MouseEvent(EventType type, 489 MouseEvent(EventType type,
489 const gfx::Point& location, 490 const gfx::Point& location,
490 const gfx::Point& root_location, 491 const gfx::Point& root_location,
491 base::TimeTicks time_stamp, 492 base::TimeTicks time_stamp,
492 int flags, 493 int flags,
493 int changed_button_flags); 494 int changed_button_flags);
494 495
495 // Conveniences to quickly test what button is down 496 // Conveniences to quickly test what button is down
496 bool IsOnlyLeftMouseButton() const { 497 bool IsOnlyLeftMouseButton() const {
497 return button_flags() == EF_LEFT_MOUSE_BUTTON; 498 return button_flags() == EF_LEFT_MOUSE_BUTTON;
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 // dispatched. This field gets a non-zero value only for gestures that are 1017 // dispatched. This field gets a non-zero value only for gestures that are
1017 // released through TouchDispositionGestureFilter::SendGesture. The gesture 1018 // released through TouchDispositionGestureFilter::SendGesture. The gesture
1018 // events that aren't fired directly in response to processing a touch-event 1019 // events that aren't fired directly in response to processing a touch-event
1019 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. 1020 // (e.g. timer fired ones), this id is zero. See crbug.com/618738.
1020 uint32_t unique_touch_event_id_; 1021 uint32_t unique_touch_event_id_;
1021 }; 1022 };
1022 1023
1023 } // namespace ui 1024 } // namespace ui
1024 1025
1025 #endif // UI_EVENTS_EVENT_H_ 1026 #endif // UI_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « mojo/converters/blink/blink_input_events_type_converters_unittest.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698