| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/base/ime/input_method_initializer.h" | 5 #include "ui/base/ime/input_method_initializer.h" |
| 6 | 6 |
| 7 #include "ui/base/ime/input_method_factory.h" | 7 #include "ui/base/ime/input_method_factory.h" |
| 8 | 8 |
| 9 #if defined(OS_CHROMEOS) | 9 #if defined(OS_CHROMEOS) |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "chromeos/dbus/dbus_thread_manager.h" | 11 #include "chromeos/dbus/dbus_thread_manager.h" |
| 12 #include "ui/base/ime/chromeos/ibus_bridge.h" | 12 #include "ui/base/ime/chromeos/ibus_bridge.h" |
| 13 #elif defined(USE_AURA) && defined(USE_X11) | 13 #elif defined(USE_AURA) && defined(USE_X11) |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "ui/base/ime/input_method_linux_x11.h" | 15 #include "ui/base/ime/input_method_auralinux.h" |
| 16 #include "ui/base/ime/linux/fake_input_method_context_factory.h" | 16 #include "ui/base/ime/linux/fake_input_method_context_factory.h" |
| 17 #elif defined(OS_WIN) | 17 #elif defined(OS_WIN) |
| 18 #include "base/win/metro.h" | 18 #include "base/win/metro.h" |
| 19 #include "ui/base/ime/win/tsf_bridge.h" | 19 #include "ui/base/ime/win/tsf_bridge.h" |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 #if defined(OS_CHROMEOS) | 24 #if defined(OS_CHROMEOS) |
| 25 bool dbus_thread_manager_was_initialized = false; | 25 bool dbus_thread_manager_was_initialized = false; |
| 26 #elif defined(USE_AURA) && defined(USE_X11) | 26 #elif defined(USE_AURA) && defined(USE_X11) |
| 27 const ui::LinuxInputMethodContextFactory* g_linux_input_method_context_factory; | 27 const ui::LinuxInputMethodContextFactory* g_linux_input_method_context_factory; |
| 28 #endif | 28 #endif |
| 29 | 29 |
| 30 } // namespace | 30 } // namespace |
| 31 | 31 |
| 32 namespace ui { | 32 namespace ui { |
| 33 | 33 |
| 34 void InitializeInputMethod() { | 34 void InitializeInputMethod() { |
| 35 #if defined(OS_CHROMEOS) | 35 #if defined(OS_CHROMEOS) |
| 36 chromeos::IBusBridge::Initialize(); | 36 chromeos::IBusBridge::Initialize(); |
| 37 #elif defined(USE_AURA) && defined(USE_X11) | 37 #elif defined(USE_AURA) && defined(USE_X11) |
| 38 InputMethodLinuxX11::Initialize(); | 38 InputMethodAuraLinux::Initialize(); |
| 39 #elif defined(OS_WIN) | 39 #elif defined(OS_WIN) |
| 40 if (base::win::IsTSFAwareRequired()) | 40 if (base::win::IsTSFAwareRequired()) |
| 41 TSFBridge::Initialize(); | 41 TSFBridge::Initialize(); |
| 42 #endif | 42 #endif |
| 43 } | 43 } |
| 44 | 44 |
| 45 void ShutdownInputMethod() { | 45 void ShutdownInputMethod() { |
| 46 #if defined(OS_CHROMEOS) | 46 #if defined(OS_CHROMEOS) |
| 47 chromeos::IBusBridge::Shutdown(); | 47 chromeos::IBusBridge::Shutdown(); |
| 48 #elif defined(OS_WIN) | 48 #elif defined(OS_WIN) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 #elif defined(OS_WIN) | 99 #elif defined(OS_WIN) |
| 100 internal::DestroySharedInputMethod(); | 100 internal::DestroySharedInputMethod(); |
| 101 if (base::win::IsTSFAwareRequired()) { | 101 if (base::win::IsTSFAwareRequired()) { |
| 102 TSFBridge::Shutdown(); | 102 TSFBridge::Shutdown(); |
| 103 CoUninitialize(); | 103 CoUninitialize(); |
| 104 } | 104 } |
| 105 #endif | 105 #endif |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace ui | 108 } // namespace ui |
| OLD | NEW |