| 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_configuration.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/chromeos/input_method/accessibility.h" | 10 #include "chrome/browser/chromeos/input_method/accessibility.h" |
| 11 #include "chrome/browser/chromeos/input_method/browser_state_monitor.h" | 11 #include "chrome/browser/chromeos/input_method/browser_state_monitor.h" |
| 12 #include "chrome/browser/chromeos/input_method/input_method_delegate_impl.h" | 12 #include "chrome/browser/chromeos/input_method/input_method_delegate_impl.h" |
| 13 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h" | 13 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h" |
| 14 #include "chrome/browser/chromeos/input_method/input_method_persistence.h" | 14 #include "chrome/browser/chromeos/input_method/input_method_persistence.h" |
| 15 #include "ui/base/ime/chromeos/ime_bridge.h" | 15 #include "ui/base/ime/chromeos/ime_bridge.h" |
| 16 | 16 |
| 17 namespace chromeos { | 17 namespace chromeos { |
| 18 namespace input_method { | 18 namespace input_method { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 void OnSessionStateChange(InputMethodManagerImpl* input_method_manager_impl, | 21 void OnSessionStateChange(InputMethodManagerImpl* input_method_manager_impl, |
| 22 InputMethodPersistence* input_method_persistence, | 22 InputMethodPersistence* input_method_persistence, |
| 23 InputMethodManager::State new_state) { | 23 InputMethodManager::UIState new_ui_state) { |
| 24 input_method_persistence->OnSessionStateChange(new_state); | 24 input_method_persistence->OnSessionStateChange(new_ui_state); |
| 25 input_method_manager_impl->SetState(new_state); | 25 input_method_manager_impl->SetUIState(new_ui_state); |
| 26 } | 26 } |
| 27 | 27 |
| 28 class InputMethodConfiguration { | 28 class InputMethodConfiguration { |
| 29 public: | 29 public: |
| 30 InputMethodConfiguration() {} | 30 InputMethodConfiguration() {} |
| 31 virtual ~InputMethodConfiguration() {} | 31 virtual ~InputMethodConfiguration() {} |
| 32 | 32 |
| 33 void Initialize( | 33 void Initialize( |
| 34 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner) { | 34 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner) { |
| 35 IMEBridge::Initialize(); | 35 IMEBridge::Initialize(); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 if (!g_input_method_configuration) | 96 if (!g_input_method_configuration) |
| 97 return; | 97 return; |
| 98 | 98 |
| 99 g_input_method_configuration->Shutdown(); | 99 g_input_method_configuration->Shutdown(); |
| 100 delete g_input_method_configuration; | 100 delete g_input_method_configuration; |
| 101 g_input_method_configuration = NULL; | 101 g_input_method_configuration = NULL; |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace input_method | 104 } // namespace input_method |
| 105 } // namespace chromeos | 105 } // namespace chromeos |
| OLD | NEW |