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

Unified Diff: chrome/browser/metro_viewer/metro_viewer_process_host_win.cc

Issue 11194044: Add keyboard events to metro aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
Index: chrome/browser/metro_viewer/metro_viewer_process_host_win.cc
===================================================================
--- chrome/browser/metro_viewer/metro_viewer_process_host_win.cc (revision 162199)
+++ chrome/browser/metro_viewer/metro_viewer_process_host_win.cc (working copy)
@@ -37,6 +37,8 @@
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SetTargetSurface, OnSetTargetSurface)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseMoved, OnMouseMoved)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseButton, OnMouseButton)
+ IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown)
+ IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyUp, OnKeyUp)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -59,12 +61,26 @@
any_window->SetNewTargetWindow(hwnd);
}
-void MetroViewerProcessHost::OnMouseMoved(int x, int y, int modifiers) {
- // TODO(cpu): Find a decent way to get to the root window host.
+// TODO(cpu): Find a decent way to get to the root window host in the
+// next four methods.
+void MetroViewerProcessHost::OnMouseMoved(int32 x, int32 y, int32 modifiers) {
aura::RemoteRootWindowHostWin::Instance()->OnMouseMoved(x, y, modifiers);
}
-void MetroViewerProcessHost::OnMouseButton(int x, int y, int modifiers) {
- // TODO(cpu): Find a decent way to get to the root window host.
+void MetroViewerProcessHost::OnMouseButton(int32 x, int32 y, int32 modifiers) {
aura::RemoteRootWindowHostWin::Instance()->OnMouseClick(x, y, modifiers);
}
+
+void MetroViewerProcessHost::OnKeyDown(uint32 vkey,
+ uint32 repeat_count,
+ uint32 scan_code) {
+ aura::RemoteRootWindowHostWin::Instance()->OnKeyDown(
+ vkey, repeat_count, scan_code);
+}
+
+void MetroViewerProcessHost::OnKeyUp(uint32 vkey,
+ uint32 repeat_count,
+ uint32 scan_code) {
+ aura::RemoteRootWindowHostWin::Instance()->OnKeyUp(
+ vkey, repeat_count, scan_code);
+}

Powered by Google App Engine
This is Rietveld 408576698