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

Unified Diff: mojo/views/native_widget_view_manager.cc

Issue 476283006: mojo: Fix double character inserts on Windows by removing a Linux hack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move input method to its own file. 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 | « mojo/views/input_method_mojo_linux.cc ('k') | ui/base/ime/input_method_auralinux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/views/native_widget_view_manager.cc
diff --git a/mojo/views/native_widget_view_manager.cc b/mojo/views/native_widget_view_manager.cc
index 1e036762d5940e329f8bdd1593a69e6cc1785a39..259e3fbb3660dacc8ec0ac514f3ce1222a9ca1ba 100644
--- a/mojo/views/native_widget_view_manager.cc
+++ b/mojo/views/native_widget_view_manager.cc
@@ -11,6 +11,7 @@
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/ime/input_method.h"
+#include "ui/base/ime/input_method_base.h"
#include "ui/base/ime/input_method_delegate.h"
#include "ui/base/ime/input_method_factory.h"
#include "ui/base/ime/text_input_client.h"
@@ -18,6 +19,10 @@
#include "ui/wm/core/capture_controller.h"
#include "ui/wm/core/focus_controller.h"
+#if defined(OS_LINUX)
+#include "mojo/views/input_method_mojo_linux.h"
+#endif
+
namespace mojo {
namespace {
@@ -41,7 +46,11 @@ class MinimalInputEventFilter : public ui::internal::InputMethodDelegate,
explicit MinimalInputEventFilter(aura::Window* root)
: root_(root) {
ui::InitializeInputMethodForTesting();
+#if defined(OS_LINUX)
+ input_method_.reset(new InputMethodMojoLinux(this));
+#else
input_method_ = ui::CreateInputMethod(this, gfx::kNullAcceleratedWidget);
+#endif
input_method_->Init(true);
root_->AddPreTargetHandler(this);
root_->SetProperty(aura::client::kRootWindowInputMethodKey,
« no previous file with comments | « mojo/views/input_method_mojo_linux.cc ('k') | ui/base/ime/input_method_auralinux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698