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

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

Issue 287233005: Revert of 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 "base/memory/scoped_ptr.h"
10 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
11 #include "ui/events/keycodes/keyboard_codes.h" 10 #include "ui/events/keycodes/keyboard_codes.h"
12 #include "ui/gfx/display.h" 11 #include "ui/gfx/display.h"
13 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
14 #include "ui/events/events_export.h" 13 #include "ui/events/events_export.h"
15 14
16 #if defined(OS_WIN) 15 #if defined(OS_WIN)
17 #include <windows.h> 16 #include <windows.h>
18 #endif 17 #endif
19 18
20 namespace gfx { 19 namespace gfx {
21 class Point; 20 class Point;
22 class Vector2d; 21 class Vector2d;
23 } 22 }
24 23
25 namespace base { 24 namespace base {
26 class TimeDelta; 25 class TimeDelta;
27 } 26 }
28 27
29 namespace ui { 28 namespace ui {
30 29
31 class Event; 30 class Event;
32 31
33 // Updates the list of devices for cached properties. 32 // Updates the list of devices for cached properties.
34 EVENTS_EXPORT void UpdateDeviceList(); 33 EVENTS_EXPORT void UpdateDeviceList();
35 34
36 // Returns a ui::Event wrapping a native event. Ownership of the returned value
37 // is transferred to the caller.
38 EVENTS_EXPORT scoped_ptr<Event> EventFromNative(
39 const base::NativeEvent& native_event);
40
41 // Get the EventType from a native event. 35 // Get the EventType from a native event.
42 EVENTS_EXPORT EventType EventTypeFromNative( 36 EVENTS_EXPORT EventType EventTypeFromNative(
43 const base::NativeEvent& native_event); 37 const base::NativeEvent& native_event);
44 38
45 // Get the EventFlags from a native event. 39 // Get the EventFlags from a native event.
46 EVENTS_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event); 40 EVENTS_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event);
47 41
48 // Get the timestamp from a native event. 42 // Get the timestamp from a native event.
49 EVENTS_EXPORT base::TimeDelta EventTimeFromNative( 43 EVENTS_EXPORT base::TimeDelta EventTimeFromNative(
50 const base::NativeEvent& native_event); 44 const base::NativeEvent& native_event);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); 156 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam);
163 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); 157 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code);
164 #endif 158 #endif
165 159
166 // Registers a custom event type. 160 // Registers a custom event type.
167 EVENTS_EXPORT int RegisterCustomEventType(); 161 EVENTS_EXPORT int RegisterCustomEventType();
168 162
169 } // namespace ui 163 } // namespace ui
170 164
171 #endif // UI_EVENTS_EVENT_UTILS_H_ 165 #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