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

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

Issue 2752093004: Makes KeyEvent struct traits restore Event::time_stamp() field (Closed)
Patch Set: 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 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 // be either a keystroke message (WM_KEYUP/WM_KEYDOWN) or a character message 810 // be either a keystroke message (WM_KEYUP/WM_KEYDOWN) or a character message
811 // (WM_CHAR). Other systems have only keystroke events. 811 // (WM_CHAR). Other systems have only keystroke events.
812 explicit KeyEvent(const base::NativeEvent& native_event); 812 explicit KeyEvent(const base::NativeEvent& native_event);
813 813
814 // Create a KeyEvent from a NativeEvent but with mocked flags. 814 // Create a KeyEvent from a NativeEvent but with mocked flags.
815 // This method is necessary for Windows since MSG does not contain all flags. 815 // This method is necessary for Windows since MSG does not contain all flags.
816 KeyEvent(const base::NativeEvent& native_event, int event_flags); 816 KeyEvent(const base::NativeEvent& native_event, int event_flags);
817 817
818 // Create a keystroke event from a legacy KeyboardCode. 818 // Create a keystroke event from a legacy KeyboardCode.
819 // This should not be used in new code. 819 // This should not be used in new code.
820 KeyEvent(EventType type, KeyboardCode key_code, int flags); 820 KeyEvent(EventType type,
821 KeyboardCode key_code,
822 int flags,
823 base::TimeTicks time_stamp = base::TimeTicks());
821 824
822 // Create a fully defined keystroke event. 825 // Create a fully defined keystroke event.
823 KeyEvent(EventType type, 826 KeyEvent(EventType type,
824 KeyboardCode key_code, 827 KeyboardCode key_code,
825 DomCode code, 828 DomCode code,
826 int flags, 829 int flags,
827 DomKey key, 830 DomKey key,
828 base::TimeTicks time_stamp); 831 base::TimeTicks time_stamp);
829 832
830 // Create a character event. 833 // Create a character event.
831 KeyEvent(base::char16 character, KeyboardCode key_code, int flags); 834 KeyEvent(base::char16 character,
835 KeyboardCode key_code,
836 int flags,
837 base::TimeTicks time_stamp = base::TimeTicks());
832 838
833 // Used for synthetic events with code of DOM KeyboardEvent (e.g. 'KeyA') 839 // Used for synthetic events with code of DOM KeyboardEvent (e.g. 'KeyA')
834 // See also: ui/events/keycodes/dom/dom_values.txt 840 // See also: ui/events/keycodes/dom/dom_values.txt
835 KeyEvent(EventType type, 841 KeyEvent(EventType type,
836 KeyboardCode key_code, 842 KeyboardCode key_code,
837 DomCode code, 843 DomCode code,
838 int flags); 844 int flags);
839 845
840 KeyEvent(const KeyEvent& rhs); 846 KeyEvent(const KeyEvent& rhs);
841 847
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 // dispatched. This field gets a non-zero value only for gestures that are 1042 // dispatched. This field gets a non-zero value only for gestures that are
1037 // released through TouchDispositionGestureFilter::SendGesture. The gesture 1043 // released through TouchDispositionGestureFilter::SendGesture. The gesture
1038 // events that aren't fired directly in response to processing a touch-event 1044 // events that aren't fired directly in response to processing a touch-event
1039 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. 1045 // (e.g. timer fired ones), this id is zero. See crbug.com/618738.
1040 uint32_t unique_touch_event_id_; 1046 uint32_t unique_touch_event_id_;
1041 }; 1047 };
1042 1048
1043 } // namespace ui 1049 } // namespace ui
1044 1050
1045 #endif // UI_EVENTS_EVENT_H_ 1051 #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