Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: ui/base/ime/input_method_initializer.cc

Issue 224723008: [linux/aura] Supports IBus in async mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/ime/input_method_auralinux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 #include "ui/base/ime/chromeos/ime_bridge.h" 8 #include "ui/base/ime/chromeos/ime_bridge.h"
9 #elif defined(USE_AURA) && defined(OS_LINUX) && !defined(USE_OZONE) 9 #elif defined(USE_AURA) && defined(OS_LINUX) && !defined(USE_OZONE)
10 #include "ui/base/ime/input_method_auralinux.h" 10 #include "base/logging.h"
11 #include "ui/base/ime/linux/fake_input_method_context_factory.h" 11 #include "ui/base/ime/linux/fake_input_method_context_factory.h"
12 #endif 12 #endif
13 13
14 namespace { 14 namespace {
15 15
16 #if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX) && \ 16 #if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX) && \
17 !defined(USE_OZONE) 17 !defined(USE_OZONE)
18 const ui::LinuxInputMethodContextFactory* g_linux_input_method_context_factory; 18 const ui::LinuxInputMethodContextFactory* g_linux_input_method_context_factory;
19 #endif 19 #endif
20 20
21 } // namespace 21 } // namespace
22 22
23 namespace ui { 23 namespace ui {
24 24
25 void InitializeInputMethod() { 25 void InitializeInputMethod() {
26 #if defined(OS_CHROMEOS) 26 #if defined(OS_CHROMEOS)
27 chromeos::IMEBridge::Initialize(); 27 chromeos::IMEBridge::Initialize();
28 #elif defined(USE_AURA) && defined(OS_LINUX) && !defined(USE_OZONE)
29 InputMethodAuraLinux::Initialize();
30 #endif 28 #endif
31 } 29 }
32 30
33 void ShutdownInputMethod() { 31 void ShutdownInputMethod() {
34 #if defined(OS_CHROMEOS) 32 #if defined(OS_CHROMEOS)
35 chromeos::IMEBridge::Shutdown(); 33 chromeos::IMEBridge::Shutdown();
36 #endif 34 #endif
37 } 35 }
38 36
39 void InitializeInputMethodForTesting() { 37 void InitializeInputMethodForTesting() {
(...skipping 20 matching lines...) Expand all
60 LinuxInputMethodContextFactory::instance(); 58 LinuxInputMethodContextFactory::instance();
61 CHECK(!factory || factory == g_linux_input_method_context_factory) 59 CHECK(!factory || factory == g_linux_input_method_context_factory)
62 << "An unknown LinuxInputMethodContextFactory was set."; 60 << "An unknown LinuxInputMethodContextFactory was set.";
63 LinuxInputMethodContextFactory::SetInstance(NULL); 61 LinuxInputMethodContextFactory::SetInstance(NULL);
64 delete g_linux_input_method_context_factory; 62 delete g_linux_input_method_context_factory;
65 g_linux_input_method_context_factory = NULL; 63 g_linux_input_method_context_factory = NULL;
66 #endif 64 #endif
67 } 65 }
68 66
69 } // namespace ui 67 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_auralinux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698