summaryrefslogtreecommitdiffstats
path: root/ui/metro_viewer
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 20:59:52 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-01 20:59:52 +0000
commit4404c0783d68fca1bcea77a780789ca6a720d15f (patch)
treef607e45638748014391770f7936c96bb66cd024e /ui/metro_viewer
parentf522800ade9624102400dbe3b338213b67b8a1fe (diff)
downloadchromium_src-4404c0783d68fca1bcea77a780789ca6a720d15f.zip
chromium_src-4404c0783d68fca1bcea77a780789ca6a720d15f.tar.gz
chromium_src-4404c0783d68fca1bcea77a780789ca6a720d15f.tar.bz2
Ensure that keyboard input works in Chrome AURA on Windows 8 in metro. cpu: please review everything,
sky: Please review the changes to ui and chrome\browser. We need to send character events to the RenderViewHost class in addition to the KeyDown/Keyup events for this to work. To achieve this we register the character received event on the Windows 8 CoreWindow class and send the character info via a new IPC message MetroViewerHostMsg_Character. The chrome side handling for this message is performed in the MockInputMethod::DispatchFabricatedKeyEvent function where we dispatch the message to the focused TextInputClient. While working on this I also noticed that we were not sending the event flags like shift/alt/Ctrl, etc to Chrome from the Metro code. Added support for that. This ensures that we are able to select text in the edit fields on the page and the omnibox, etc. The above changes will most likely not work with IME's. Will look into that in a subsequent change. BUG=158637 R=cpu,sky Review URL: https://codereview.chromium.org/11348053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165496 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/metro_viewer')
-rw-r--r--ui/metro_viewer/metro_viewer_messages.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/ui/metro_viewer/metro_viewer_messages.h b/ui/metro_viewer/metro_viewer_messages.h
index b94a561..ef72ec9 100644
--- a/ui/metro_viewer/metro_viewer_messages.h
+++ b/ui/metro_viewer/metro_viewer_messages.h
@@ -26,12 +26,19 @@ IPC_MESSAGE_CONTROL3(MetroViewerHostMsg_MouseButton,
int32, /* y-coordinate */
int32 /* modifiers */)
// Informs the browser that a key was pressed.
-IPC_MESSAGE_CONTROL3(MetroViewerHostMsg_KeyDown,
+IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_KeyDown,
uint32, /* virtual key */
uint32, /* repeat count */
- uint32 /* scan code*/);
+ uint32, /* scan code */
+ uint32 /* key state */);
// Informs the browser that a key was released.
-IPC_MESSAGE_CONTROL3(MetroViewerHostMsg_KeyUp,
+IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_KeyUp,
uint32, /* virtual key */
uint32, /* repeat count */
- uint32 /* scan code*/);
+ uint32, /* scan code */
+ uint32 /* key state */);
+IPC_MESSAGE_CONTROL4(MetroViewerHostMsg_Character,
+ uint32, /* virtual key */
+ uint32, /* repeat count */
+ uint32, /* scan code */
+ uint32 /* key state */);