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

Unified Diff: ui/events/event_utils.h

Issue 492863002: mojo: Plumb through sufficient context to make real blink::WebInputEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final sky nits Created 6 years, 4 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 97eca9cdbe50c5ab7cb1712179bae6a0f2d3a39f..312d580e0e6d4dde4261c3bb147d67217351ee06 100644
--- a/ui/events/event_utils.h
+++ b/ui/events/event_utils.h
@@ -87,6 +87,27 @@ EVENTS_EXPORT const char* CodeFromNative(
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 uint16 GetControlCharacterForKeycode(int windows_key_code,
+ bool shift);
+#endif
+
// Returns true if the keyboard event is a character event rather than
// a keystroke event.
EVENTS_EXPORT bool IsCharFromNative(const base::NativeEvent& native_event);
@@ -133,20 +154,20 @@ EVENTS_EXPORT float GetTouchForce(const base::NativeEvent& native_event);
// Gets the fling velocity from a native event. is_cancel is set to true if
// this was a tap down, intended to stop an ongoing fling.
EVENTS_EXPORT bool GetFlingData(const base::NativeEvent& native_event,
- float* vx,
- float* vy,
- float* vx_ordinal,
- float* vy_ordinal,
- bool* is_cancel);
+ float* vx,
+ float* vy,
+ float* vx_ordinal,
+ float* vy_ordinal,
+ bool* is_cancel);
// Returns whether this is a scroll event and optionally gets the amount to be
// scrolled. |x_offset|, |y_offset| and |finger_count| can be NULL.
EVENTS_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event,
- float* x_offset,
- float* y_offset,
- float* x_offset_ordinal,
- float* y_offset_ordinal,
- int* finger_count);
+ float* x_offset,
+ float* y_offset,
+ float* x_offset_ordinal,
+ float* y_offset_ordinal,
+ int* finger_count);
// Returns whether natural scrolling should be used for touchpad.
EVENTS_EXPORT bool ShouldDefaultToNaturalScroll();
« 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