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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.cc

Issue 10092006: Add Reset() to IBusController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 | Annotate | Revision Log
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 "chrome/browser/chromeos/input_method/input_method_manager_impl.h" 5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h"
6 6
7 #include <algorithm> // std::find 7 #include <algorithm> // std::find
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 DVLOG(1) << "Can't change the current input method to " 235 DVLOG(1) << "Can't change the current input method to "
236 << input_method_id << " since the engine is not enabled. " 236 << input_method_id << " since the engine is not enabled. "
237 << "Switch to " << input_method_id_to_switch << " instead."; 237 << "Switch to " << input_method_id_to_switch << " instead.";
238 } 238 }
239 } 239 }
240 240
241 if (InputMethodUtil::IsKeyboardLayout(input_method_id_to_switch)) { 241 if (InputMethodUtil::IsKeyboardLayout(input_method_id_to_switch)) {
242 FOR_EACH_OBSERVER(InputMethodManager::Observer, 242 FOR_EACH_OBSERVER(InputMethodManager::Observer,
243 observers_, 243 observers_,
244 InputMethodPropertyChanged(this)); 244 InputMethodPropertyChanged(this));
245 ibus_controller_->Reset();
245 } else { 246 } else {
246 ibus_controller_->ChangeInputMethod(input_method_id_to_switch); 247 ibus_controller_->ChangeInputMethod(input_method_id_to_switch);
247 } 248 }
248 249
249 if (current_input_method_.id() != input_method_id_to_switch) { 250 if (current_input_method_.id() != input_method_id_to_switch) {
250 const InputMethodDescriptor* descriptor = NULL; 251 const InputMethodDescriptor* descriptor = NULL;
251 if (!InputMethodUtil::IsExtensionInputMethod(input_method_id_to_switch)) { 252 if (!InputMethodUtil::IsExtensionInputMethod(input_method_id_to_switch)) {
252 descriptor = 253 descriptor =
253 util_.GetInputMethodDescriptorFromId(input_method_id_to_switch); 254 util_.GetInputMethodDescriptorFromId(input_method_id_to_switch);
254 } else { 255 } else {
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 #endif 594 #endif
594 } 595 }
595 596
596 // static 597 // static
597 InputMethodManagerImpl* InputMethodManagerImpl::GetInstanceForTesting() { 598 InputMethodManagerImpl* InputMethodManagerImpl::GetInstanceForTesting() {
598 return new InputMethodManagerImpl; 599 return new InputMethodManagerImpl;
599 } 600 }
600 601
601 } // namespace input_method 602 } // namespace input_method
602 } // namespace chromeos 603 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698