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

Side by Side Diff: chrome/browser/chromeos/cros/input_method_library.cc

Issue 3080027: Explicitly set the input method on IME connected, even if it's the hardware layout. (Closed)
Patch Set: Code Review Created 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/cros/input_method_library.h" 5 #include "chrome/browser/chromeos/cros/input_method_library.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/chrome_thread.h" 10 #include "chrome/browser/chrome_thread.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 void InputMethodLibraryImpl::ConnectionChangeHandler(void* object, 264 void InputMethodLibraryImpl::ConnectionChangeHandler(void* object,
265 bool connected) { 265 bool connected) {
266 InputMethodLibraryImpl* input_method_library = 266 InputMethodLibraryImpl* input_method_library =
267 static_cast<InputMethodLibraryImpl*>(object); 267 static_cast<InputMethodLibraryImpl*>(object);
268 input_method_library->ime_connected_ = connected; 268 input_method_library->ime_connected_ = connected;
269 if (connected) { 269 if (connected) {
270 input_method_library->pending_config_requests_.clear(); 270 input_method_library->pending_config_requests_.clear();
271 input_method_library->pending_config_requests_.insert( 271 input_method_library->pending_config_requests_.insert(
272 input_method_library->current_config_values_.begin(), 272 input_method_library->current_config_values_.begin(),
273 input_method_library->current_config_values_.end()); 273 input_method_library->current_config_values_.end());
274 // When the IME process starts up, the hardware layout will be the current 274 input_method_library->need_input_method_set_ = true;
275 // method. If this is not correct, we'll need to explicitly change it.
276 if (input_method_library->active_input_method_ != kHardwareKeyboardLayout) {
277 input_method_library->need_input_method_set_ = true;
278 }
279 input_method_library->FlushImeConfig(); 275 input_method_library->FlushImeConfig();
280 } else { 276 } else {
281 // Stop attempting to resend config data, since it will continue to fail. 277 // Stop attempting to resend config data, since it will continue to fail.
282 input_method_library->timer_.Stop(); // no-op if it's not running. 278 input_method_library->timer_.Stop(); // no-op if it's not running.
283 } 279 }
284 } 280 }
285 281
286 bool InputMethodLibraryImpl::EnsureStarted() { 282 bool InputMethodLibraryImpl::EnsureStarted() {
287 if (!input_method_status_connection_) { 283 if (!input_method_status_connection_) {
288 input_method_status_connection_ = chromeos::MonitorInputMethodStatus( 284 input_method_status_connection_ = chromeos::MonitorInputMethodStatus(
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 if (library->ime_handle_ == pid) { 445 if (library->ime_handle_ == pid) {
450 library->ime_handle_ = 0; 446 library->ime_handle_ = 0;
451 } else if (library->candidate_window_handle_ == pid) { 447 } else if (library->candidate_window_handle_ == pid) {
452 library->candidate_window_handle_ = 0; 448 library->candidate_window_handle_ = 0;
453 } 449 }
454 450
455 library->MaybeLaunchIme(); 451 library->MaybeLaunchIme();
456 } 452 }
457 453
458 } // namespace chromeos 454 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698