OLD | NEW |
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 <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 new_impl_state->current_input_method.id() | 747 new_impl_state->current_input_method.id() |
748 : true); | 748 : true); |
749 state_ = new_impl_state; | 749 state_ = new_impl_state; |
750 | 750 |
751 if (state_ && state_->active_input_method_ids.size()) { | 751 if (state_ && state_->active_input_method_ids.size()) { |
752 // Initialize candidate window controller and widgets such as | 752 // Initialize candidate window controller and widgets such as |
753 // candidate window, infolist and mode indicator. Note, mode | 753 // candidate window, infolist and mode indicator. Note, mode |
754 // indicator is used by only keyboard layout input methods. | 754 // indicator is used by only keyboard layout input methods. |
755 MaybeInitializeCandidateWindowController(); | 755 MaybeInitializeCandidateWindowController(); |
756 | 756 |
757 if (need_update_current_input_method) | 757 if (need_update_current_input_method) { |
758 ChangeInputMethodInternal(state_->current_input_method, | 758 ChangeInputMethodInternal(state_->current_input_method, |
759 false /* show_message */, | 759 false /* show_message */, |
760 true /* notify_menu */); | 760 true /* notify_menu */); |
| 761 } else { |
| 762 // Update input method indicators (e.g. "US", "DV") in Chrome windows. |
| 763 FOR_EACH_OBSERVER(InputMethodManager::Observer, |
| 764 observers_, |
| 765 InputMethodChanged(this, false /* show_message */)); |
| 766 } |
761 } | 767 } |
762 } | 768 } |
763 | 769 |
764 scoped_refptr<InputMethodManager::State> | 770 scoped_refptr<InputMethodManager::State> |
765 InputMethodManagerImpl::GetActiveIMEState() { | 771 InputMethodManagerImpl::GetActiveIMEState() { |
766 return scoped_refptr<InputMethodManager::State>(state_.get()); | 772 return scoped_refptr<InputMethodManager::State>(state_.get()); |
767 } | 773 } |
768 | 774 |
769 InputMethodManagerImpl::InputMethodManagerImpl( | 775 InputMethodManagerImpl::InputMethodManagerImpl( |
770 scoped_ptr<InputMethodDelegate> delegate, | 776 scoped_ptr<InputMethodDelegate> delegate, |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 if (candidate_window_controller_.get()) | 1044 if (candidate_window_controller_.get()) |
1039 return; | 1045 return; |
1040 | 1046 |
1041 candidate_window_controller_.reset( | 1047 candidate_window_controller_.reset( |
1042 CandidateWindowController::CreateCandidateWindowController()); | 1048 CandidateWindowController::CreateCandidateWindowController()); |
1043 candidate_window_controller_->AddObserver(this); | 1049 candidate_window_controller_->AddObserver(this); |
1044 } | 1050 } |
1045 | 1051 |
1046 } // namespace input_method | 1052 } // namespace input_method |
1047 } // namespace chromeos | 1053 } // namespace chromeos |
OLD | NEW |