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

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

Issue 284903002: Only dispatch menu events if they have a valid target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/events/event_utils.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_UTILS_H_ 5 #ifndef UI_EVENTS_EVENT_UTILS_H_
6 #define UI_EVENTS_EVENT_UTILS_H_ 6 #define UI_EVENTS_EVENT_UTILS_H_
7 7
8 #include "base/event_types.h" 8 #include "base/event_types.h"
9 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
10 #include "ui/events/keycodes/keyboard_codes.h" 10 #include "ui/events/keycodes/keyboard_codes.h"
(...skipping 14 matching lines...) Expand all
25 class TimeDelta; 25 class TimeDelta;
26 } 26 }
27 27
28 namespace ui { 28 namespace ui {
29 29
30 class Event; 30 class Event;
31 31
32 // Updates the list of devices for cached properties. 32 // Updates the list of devices for cached properties.
33 EVENTS_EXPORT void UpdateDeviceList(); 33 EVENTS_EXPORT void UpdateDeviceList();
34 34
35 // Returns a ui::Event wrapping a native event. Ownership of the returned value
36 // is transferred to the caller.
37 EVENTS_EXPORT Event* EventFromNative(const base::NativeEvent& native_event);
sadrul 2014/05/14 03:23:10 Return a scoped_ptr<>
flackr 2014/05/15 21:12:57 Done.
38
35 // Get the EventType from a native event. 39 // Get the EventType from a native event.
36 EVENTS_EXPORT EventType EventTypeFromNative( 40 EVENTS_EXPORT EventType EventTypeFromNative(
37 const base::NativeEvent& native_event); 41 const base::NativeEvent& native_event);
38 42
39 // Get the EventFlags from a native event. 43 // Get the EventFlags from a native event.
40 EVENTS_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event); 44 EVENTS_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event);
41 45
42 // Get the timestamp from a native event. 46 // Get the timestamp from a native event.
43 EVENTS_EXPORT base::TimeDelta EventTimeFromNative( 47 EVENTS_EXPORT base::TimeDelta EventTimeFromNative(
44 const base::NativeEvent& native_event); 48 const base::NativeEvent& native_event);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); 160 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam);
157 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); 161 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code);
158 #endif 162 #endif
159 163
160 // Registers a custom event type. 164 // Registers a custom event type.
161 EVENTS_EXPORT int RegisterCustomEventType(); 165 EVENTS_EXPORT int RegisterCustomEventType();
162 166
163 } // namespace ui 167 } // namespace ui
164 168
165 #endif // UI_EVENTS_EVENT_UTILS_H_ 169 #endif // UI_EVENTS_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/event_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698