OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "views/ime/input_method_manager.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 namespace views { |
| 10 |
| 11 void InputMethodManager::AddTextInputTypeChangedListener( |
| 12 TextInputTypeChangedListener* listener) { |
| 13 text_input_type_changed_listeners_.AddObserver(listener); |
| 14 } |
| 15 |
| 16 void InputMethodManager::RemoveTextInputTypeChangedListener( |
| 17 TextInputTypeChangedListener* listener) { |
| 18 text_input_type_changed_listeners_.RemoveObserver(listener); |
| 19 } |
| 20 |
| 21 void InputMethodManager::OnTextInputTypeChanged(ui::TextInputType type, |
| 22 Widget* widget) { |
| 23 FOR_EACH_OBSERVER(TextInputTypeChangedListener, |
| 24 text_input_type_changed_listeners_, |
| 25 TextInputTypeChanged(type, widget)); |
| 26 } |
| 27 |
| 28 InputMethodManager::InputMethodManager() { |
| 29 } |
| 30 |
| 31 InputMethodManager::~InputMethodManager() { |
| 32 } |
| 33 |
| 34 // static |
| 35 InputMethodManager* |
| 36 InputMethodManager::GetInstance() { |
| 37 return Singleton<InputMethodManager>::get(); |
| 38 } |
| 39 |
| 40 } // namespace views |
OLD | NEW |