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

Unified Diff: ui/views/ime/input_method_wayland.cc

Issue 8598024: Now that we are doing a hard-cut-over to Aura, remove a bunch of *Views based classes that are ob... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « ui/views/ime/input_method_wayland.h ('k') | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/ime/input_method_wayland.cc
===================================================================
--- ui/views/ime/input_method_wayland.cc (revision 110826)
+++ ui/views/ime/input_method_wayland.cc (working copy)
@@ -1,76 +0,0 @@
-// Copyright (c) 2011 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 "ui/views/ime/input_method_wayland.h"
-
-#include "views/widget/widget.h"
-
-namespace views {
-
-InputMethodWayland::InputMethodWayland(
- internal::InputMethodDelegate *delegate) {
- set_delegate(delegate);
-}
-
-void InputMethodWayland::DispatchKeyEvent(const KeyEvent& key) {
- if (!GetTextInputClient()) {
- DispatchKeyEventPostIME(key);
- return;
- }
-
- if (key.type() == ui::ET_KEY_PRESSED) {
- ProcessKeyPressEvent(key);
- } else if (key.type() == ui::ET_KEY_RELEASED) {
- DispatchKeyEventPostIME(key);
- }
-}
-
-void InputMethodWayland::OnTextInputTypeChanged(View* view) {
- NOTIMPLEMENTED();
-}
-
-void InputMethodWayland::OnCaretBoundsChanged(View* view) {
- NOTIMPLEMENTED();
-}
-
-void InputMethodWayland::CancelComposition(View* view) {
- NOTIMPLEMENTED();
-}
-
-std::string InputMethodWayland::GetInputLocale() {
- return std::string("");
-}
-
-base::i18n::TextDirection InputMethodWayland::GetInputTextDirection() {
- return base::i18n::UNKNOWN_DIRECTION;
-}
-
-bool InputMethodWayland::IsActive() {
- return true;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// InputMethodWayland private
-
-void InputMethodWayland::ProcessKeyPressEvent(const KeyEvent& key) {
- const View* old_focused_view = focused_view();
- DispatchKeyEventPostIME(key);
-
- // We shouldn't dispatch the character anymore if the key event caused focus
- // change.
- if (old_focused_view != focused_view())
- return;
-
- // If a key event was not filtered by |context_| or |context_simple_|, then
- // it means the key event didn't generate any result text. For some cases,
- // the key event may still generate a valid character, eg. a control-key
- // event (ctrl-a, return, tab, etc.). We need to send the character to the
- // focused text input client by calling TextInputClient::InsertChar().
- char16 ch = key.GetCharacter();
- ui::TextInputClient* client = GetTextInputClient();
- if (ch && client)
- client->InsertChar(ch, key.flags());
-}
-
-} // namespace views
« no previous file with comments | « ui/views/ime/input_method_wayland.h ('k') | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698