| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include <glib.h> | 9 #include <glib.h> |
| 10 | 10 |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 // necessary when the current layout (e.g. INTL) out of two (e.g. US and | 690 // necessary when the current layout (e.g. INTL) out of two (e.g. US and |
| 691 // INTL) is disabled. | 691 // INTL) is disabled. |
| 692 ChangeCurrentInputMethodFromId(value.string_list_value[0]); | 692 ChangeCurrentInputMethodFromId(value.string_list_value[0]); |
| 693 } | 693 } |
| 694 // Update the indicator. | 694 // Update the indicator. |
| 695 // TODO(yusukes): Remove ActiveInputMethodsChanged notification in | 695 // TODO(yusukes): Remove ActiveInputMethodsChanged notification in |
| 696 // FlushImeConfig(). | 696 // FlushImeConfig(). |
| 697 const size_t num_active_input_methods = GetNumActiveInputMethods(); | 697 const size_t num_active_input_methods = GetNumActiveInputMethods(); |
| 698 FOR_EACH_OBSERVER(InputMethodManager::Observer, observers_, | 698 FOR_EACH_OBSERVER(InputMethodManager::Observer, observers_, |
| 699 ActiveInputMethodsChanged(this, | 699 ActiveInputMethodsChanged(this, |
| 700 current_input_method_, | 700 current_input_method(), |
| 701 num_active_input_methods)); | 701 num_active_input_methods)); |
| 702 } | 702 } |
| 703 } | 703 } |
| 704 | 704 |
| 705 // Changes the current input method to |input_method_id| via IBus | 705 // Changes the current input method to |input_method_id| via IBus |
| 706 // daemon. If the id is not in the preload_engine list, this function | 706 // daemon. If the id is not in the preload_engine list, this function |
| 707 // changes the current method to the first preloaded engine. Returns | 707 // changes the current method to the first preloaded engine. Returns |
| 708 // true if the current engine is switched to |input_method_id| or the | 708 // true if the current engine is switched to |input_method_id| or the |
| 709 // first one. | 709 // first one. |
| 710 bool ChangeInputMethodViaIBus(const std::string& input_method_id) { | 710 bool ChangeInputMethodViaIBus(const std::string& input_method_id) { |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 return InputMethodManagerImpl::GetInstance(); | 1385 return InputMethodManagerImpl::GetInstance(); |
| 1386 } | 1386 } |
| 1387 | 1387 |
| 1388 } // namespace input_method | 1388 } // namespace input_method |
| 1389 } // namespace chromeos | 1389 } // namespace chromeos |
| 1390 | 1390 |
| 1391 // Allows InvokeLater without adding refcounting. This class is a Singleton and | 1391 // Allows InvokeLater without adding refcounting. This class is a Singleton and |
| 1392 // won't be deleted until it's last InvokeLater is run. | 1392 // won't be deleted until it's last InvokeLater is run. |
| 1393 DISABLE_RUNNABLE_METHOD_REFCOUNT( | 1393 DISABLE_RUNNABLE_METHOD_REFCOUNT( |
| 1394 chromeos::input_method::InputMethodManagerImpl); | 1394 chromeos::input_method::InputMethodManagerImpl); |
| OLD | NEW |