Index: mojo/services/window_manager/window_manager_app_android.cc |
diff --git a/mojo/services/window_manager/window_manager_app_android.cc b/mojo/services/window_manager/window_manager_app_android.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..84feff122c2eb54a559f2e661be1738a56271293 |
--- /dev/null |
+++ b/mojo/services/window_manager/window_manager_app_android.cc |
@@ -0,0 +1,20 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "mojo/services/window_manager/window_manager_app.h" |
+ |
+#include <android/keycodes.h> |
+ |
+#include "ui/events/keycodes/keyboard_codes_posix.h" |
+ |
+namespace window_manager { |
+ |
+ui::Accelerator WindowManagerApp::ConvertEventToAccelerator( |
+ const ui::KeyEvent* event) { |
+ if (event->platform_keycode() == AKEYCODE_BACK) |
+ return ui::Accelerator(ui::VKEY_BROWSER_BACK, 0); |
+ return ui::Accelerator(event->key_code(), event->flags()); |
+} |
+ |
+} // namespace window_manager |