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

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

Issue 380943003: Do not release capture when transferring capture between Chrome windows on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/x/events_x.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" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Gets the location in native system coordinate space. 63 // Gets the location in native system coordinate space.
64 EVENTS_EXPORT gfx::Point EventSystemLocationFromNative( 64 EVENTS_EXPORT gfx::Point EventSystemLocationFromNative(
65 const base::NativeEvent& native_event); 65 const base::NativeEvent& native_event);
66 66
67 #if defined(USE_X11) 67 #if defined(USE_X11)
68 // Returns the 'real' button for an event. The button reported in slave events 68 // Returns the 'real' button for an event. The button reported in slave events
69 // does not take into account any remapping (e.g. using xmodmap), while the 69 // does not take into account any remapping (e.g. using xmodmap), while the
70 // button reported in master events do. This is a utility function to always 70 // button reported in master events do. This is a utility function to always
71 // return the mapped button. 71 // return the mapped button.
72 EVENTS_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event); 72 EVENTS_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event);
73
74 // Returns the target for an event.
75 EVENTS_EXPORT gfx::AcceleratedWidget EventTargetFromNative(
76 const base::NativeEvent& native_event);
sadrul 2014/07/21 06:57:59 Can this live inside desktop_window_tree_host_x11.
73 #endif 77 #endif
74 78
75 // Returns the KeyboardCode from a native event. 79 // Returns the KeyboardCode from a native event.
76 EVENTS_EXPORT KeyboardCode KeyboardCodeFromNative( 80 EVENTS_EXPORT KeyboardCode KeyboardCodeFromNative(
77 const base::NativeEvent& native_event); 81 const base::NativeEvent& native_event);
78 82
79 // Returns the DOM KeyboardEvent code (physical location in the 83 // Returns the DOM KeyboardEvent code (physical location in the
80 // keyboard) from a native event. The ownership of the return value 84 // keyboard) from a native event. The ownership of the return value
81 // is NOT trasferred to the caller. 85 // is NOT trasferred to the caller.
82 EVENTS_EXPORT const char* CodeFromNative( 86 EVENTS_EXPORT const char* CodeFromNative(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); 171 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code);
168 172
169 #endif 173 #endif
170 174
171 // Registers a custom event type. 175 // Registers a custom event type.
172 EVENTS_EXPORT int RegisterCustomEventType(); 176 EVENTS_EXPORT int RegisterCustomEventType();
173 177
174 } // namespace ui 178 } // namespace ui
175 179
176 #endif // UI_EVENTS_EVENT_UTILS_H_ 180 #endif // UI_EVENTS_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/x/events_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698