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

Unified Diff: mojo/views/input_method_mojo_linux.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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.h ('k') | mojo/views/native_widget_mojo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/views/input_method_mojo_linux.cc
diff --git a/mojo/views/input_method_mojo_linux.cc b/mojo/views/input_method_mojo_linux.cc
deleted file mode 100644
index e54b6448175f03f7ccbe7a0c1db88e27a31b22c1..0000000000000000000000000000000000000000
--- a/mojo/views/input_method_mojo_linux.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014 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/views/input_method_mojo_linux.h"
-
-#include "ui/base/ime/text_input_client.h"
-#include "ui/events/event.h"
-
-namespace mojo {
-
-InputMethodMojoLinux::InputMethodMojoLinux(
- ui::internal::InputMethodDelegate* delegate)
- : ui::InputMethodAuraLinux(delegate) {
-}
-
-InputMethodMojoLinux::~InputMethodMojoLinux() {}
-
-bool InputMethodMojoLinux::DispatchKeyEvent(const ui::KeyEvent& event) {
- DCHECK(event.type() == ui::ET_KEY_PRESSED ||
- event.type() == ui::ET_KEY_RELEASED);
- DCHECK(system_toplevel_window_focused());
-
- // If no text input client, do nothing.
- if (!GetTextInputClient())
- return DispatchKeyEventPostIME(event);
-
- // Here is where we change the differ from our base class's logic. Instead of
- // always dispatching a key down event, and then sending a synthesized
- // character event, we instead check to see if this is a character event and
- // send out the key if it is. (We fallback to normal dispatch if it isn't.)
- if (event.is_char()) {
- const uint16 ch = event.GetCharacter();
- if (GetTextInputClient())
- GetTextInputClient()->InsertChar(ch, event.flags());
-
- return false;
- }
-
- return DispatchKeyEventPostIME(event);
-}
-
-} // namespace mojo
« no previous file with comments | « mojo/views/input_method_mojo_linux.h ('k') | mojo/views/native_widget_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698