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

Unified Diff: mandoline/ui/aura/input_method_mojo_linux.h

Issue 1123643007: Restore aura support from Mojo repo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 7 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 | « mandoline/ui/aura/aura_init.cc ('k') | mandoline/ui/aura/input_method_mojo_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/ui/aura/input_method_mojo_linux.h
diff --git a/mandoline/ui/aura/input_method_mojo_linux.h b/mandoline/ui/aura/input_method_mojo_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..f5e7fb1398d7414581a266bde3786f6cd1299da0
--- /dev/null
+++ b/mandoline/ui/aura/input_method_mojo_linux.h
@@ -0,0 +1,38 @@
+// 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.
+
+#ifndef MANDOLINE_UI_AURA_INPUT_METHOD_MOJO_LINUX_H_
+#define MANDOLINE_UI_AURA_INPUT_METHOD_MOJO_LINUX_H_
+
+#include "ui/base/ime/input_method_auralinux.h"
+#include "ui/base/ime/input_method_delegate.h"
+
+namespace mandoline {
+
+// An input method for linux that does absolutely no translation.
+//
+// The current InputMethodMinimal makes assumptions that a system will only
+// input/output keydown/keyup events; it assumes that things don't work like
+// Windows does. When it gets a keydown event, it then tries to insert a
+// character at the same time.
+//
+// However, we're standardizing on Windows' WM_CHAR style events. This tries to
+// follow InputMethodWin::DispatchKeyEvent() instead, because PlatformViewX11
+// now synthesizes a character events so that we have one behaviour across our
+// platforms.
+class InputMethodMojoLinux : public ui::InputMethodAuraLinux {
+ public:
+ explicit InputMethodMojoLinux(ui::internal::InputMethodDelegate* delegate);
+ ~InputMethodMojoLinux() override;
+
+ // Overriden from ui::InputMethodAuraLinux:
+ bool DispatchKeyEvent(const ui::KeyEvent& event) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(InputMethodMojoLinux);
+};
+
+} // namespace mandoline
+
+#endif // MANDOLINE_UI_AURA_INPUT_METHOD_MOJO_LINUX_H_
« no previous file with comments | « mandoline/ui/aura/aura_init.cc ('k') | mandoline/ui/aura/input_method_mojo_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698