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

Side by Side Diff: ui/base/ime/input_method_base.cc

Issue 2298123003: Using input language instead of the application locale to determine the Omnibox's text input type o… (Closed)
Patch Set: fix compiling errors in mus. Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/input_method_base_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/ime/input_method_base.h" 5 #include "ui/base/ime/input_method_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 TextInputClient* InputMethodBase::GetTextInputClient() const { 58 TextInputClient* InputMethodBase::GetTextInputClient() const {
59 return text_input_client_; 59 return text_input_client_;
60 } 60 }
61 61
62 void InputMethodBase::OnTextInputTypeChanged(const TextInputClient* client) { 62 void InputMethodBase::OnTextInputTypeChanged(const TextInputClient* client) {
63 if (!IsTextInputClientFocused(client)) 63 if (!IsTextInputClientFocused(client))
64 return; 64 return;
65 NotifyTextInputStateChanged(client); 65 NotifyTextInputStateChanged(client);
66 } 66 }
67 67
68 void InputMethodBase::OnInputLocaleChanged() {
69 }
70
71 bool InputMethodBase::IsInputLocaleCJK() const {
72 return false;
73 }
74
68 TextInputType InputMethodBase::GetTextInputType() const { 75 TextInputType InputMethodBase::GetTextInputType() const {
69 TextInputClient* client = GetTextInputClient(); 76 TextInputClient* client = GetTextInputClient();
70 return client ? client->GetTextInputType() : TEXT_INPUT_TYPE_NONE; 77 return client ? client->GetTextInputType() : TEXT_INPUT_TYPE_NONE;
71 } 78 }
72 79
73 TextInputMode InputMethodBase::GetTextInputMode() const { 80 TextInputMode InputMethodBase::GetTextInputMode() const {
74 TextInputClient* client = GetTextInputClient(); 81 TextInputClient* client = GetTextInputClient();
75 return client ? client->GetTextInputMode() : TEXT_INPUT_MODE_DEFAULT; 82 return client ? client->GetTextInputMode() : TEXT_INPUT_MODE_DEFAULT;
76 } 83 }
77 84
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 InputMethod* InputMethodBase::GetInputMethod() { 217 InputMethod* InputMethodBase::GetInputMethod() {
211 return this; 218 return this;
212 } 219 }
213 220
214 const std::vector<std::unique_ptr<ui::KeyEvent>>& 221 const std::vector<std::unique_ptr<ui::KeyEvent>>&
215 InputMethodBase::GetKeyEventsForTesting() { 222 InputMethodBase::GetKeyEventsForTesting() {
216 return key_events_for_testing_; 223 return key_events_for_testing_;
217 } 224 }
218 225
219 } // namespace ui 226 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/input_method_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698