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

Unified Diff: ui/events/event_utils.h

Issue 536313002: Revert of Removing X11 native_event uses for key events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/event_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_utils.h
diff --git a/ui/events/event_utils.h b/ui/events/event_utils.h
index f1f5f34d2754a3567268a7a8580abdfd2246431a..312d580e0e6d4dde4261c3bb147d67217351ee06 100644
--- a/ui/events/event_utils.h
+++ b/ui/events/event_utils.h
@@ -5,10 +5,8 @@
#ifndef UI_EVENTS_EVENT_UTILS_H_
#define UI_EVENTS_EVENT_UTILS_H_
-#include "base/basictypes.h"
#include "base/event_types.h"
#include "base/memory/scoped_ptr.h"
-#include "base/strings/string16.h"
#include "ui/events/event_constants.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/display.h"
@@ -89,9 +87,26 @@
EVENTS_EXPORT uint32 PlatformKeycodeFromNative(
const base::NativeEvent& native_event);
+// Returns the windows key code. Note that this value is different from
+// KeyboardCodeFromNative (there is a divergence between ui::KeyboardCode and
+// windows key codes).
+EVENTS_EXPORT uint32 WindowsKeycodeFromNative(
+ const base::NativeEvent& native_event);
+
+// Returns the text generated by this keystroke. Used in the value we pass to
+// blink.
+EVENTS_EXPORT uint16 TextFromNative(const base::NativeEvent& native_event);
+
+// Returns the unmodified text generated by this keystroke. Used in the value
+// we pass to blink.
+EVENTS_EXPORT uint16 UnmodifiedTextFromNative(
+ const base::NativeEvent& native_event);
+
+#if defined(OS_LINUX)
// Returns a control character sequences from a |windows_key_code|.
-EVENTS_EXPORT base::char16 GetControlCharacterForKeycode(int windows_key_code,
- bool shift);
+EVENTS_EXPORT uint16 GetControlCharacterForKeycode(int windows_key_code,
+ bool shift);
+#endif
// Returns true if the keyboard event is a character event rather than
// a keystroke event.
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/event_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698