| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/remote_input_method_win.h" | 5 #include "ui/base/ime/remote_input_method_win.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/win/metro.h" | 10 #include "base/win/metro.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 GetLocaleString(locale_id, LOCALE_SISO639LANGNAME); | 243 GetLocaleString(locale_id, LOCALE_SISO639LANGNAME); |
| 244 if (SUBLANGID(langid_) == SUBLANG_NEUTRAL || language.empty()) | 244 if (SUBLANGID(langid_) == SUBLANG_NEUTRAL || language.empty()) |
| 245 return language; | 245 return language; |
| 246 const std::string& region = | 246 const std::string& region = |
| 247 GetLocaleString(locale_id, LOCALE_SISO3166CTRYNAME); | 247 GetLocaleString(locale_id, LOCALE_SISO3166CTRYNAME); |
| 248 if (region.empty()) | 248 if (region.empty()) |
| 249 return language; | 249 return language; |
| 250 return language.append(1, '-').append(region); | 250 return language.append(1, '-').append(region); |
| 251 } | 251 } |
| 252 | 252 |
| 253 bool IsActive() override { | |
| 254 return true; // always turned on | |
| 255 } | |
| 256 | |
| 257 TextInputType GetTextInputType() const override { | 253 TextInputType GetTextInputType() const override { |
| 258 return text_input_client_ ? text_input_client_->GetTextInputType() | 254 return text_input_client_ ? text_input_client_->GetTextInputType() |
| 259 : TEXT_INPUT_TYPE_NONE; | 255 : TEXT_INPUT_TYPE_NONE; |
| 260 } | 256 } |
| 261 | 257 |
| 262 TextInputMode GetTextInputMode() const override { | 258 TextInputMode GetTextInputMode() const override { |
| 263 return text_input_client_ ? text_input_client_->GetTextInputMode() | 259 return text_input_client_ ? text_input_client_->GetTextInputMode() |
| 264 : TEXT_INPUT_MODE_DEFAULT; | 260 : TEXT_INPUT_MODE_DEFAULT; |
| 265 } | 261 } |
| 266 | 262 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 return make_scoped_ptr(new RemoteInputMethodWin(delegate)); | 375 return make_scoped_ptr(new RemoteInputMethodWin(delegate)); |
| 380 } | 376 } |
| 381 | 377 |
| 382 // static | 378 // static |
| 383 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( | 379 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( |
| 384 InputMethod* input_method) { | 380 InputMethod* input_method) { |
| 385 return GetPrivate(input_method); | 381 return GetPrivate(input_method); |
| 386 } | 382 } |
| 387 | 383 |
| 388 } // namespace ui | 384 } // namespace ui |
| OLD | NEW |