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

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

Issue 100213003: Support for providing IMEContext with Ozone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mv InputMethodContextFactoryOzone to ozone/ime Created 7 years 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
OLDNEW
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 "ui/base/ime/input_method_factory.h" 5 #include "ui/base/ime/input_method_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "ui/base/ime/mock_input_method.h" 8 #include "ui/base/ime/mock_input_method.h"
9 9
10 #if defined(OS_CHROMEOS) && defined(USE_X11) 10 #if defined(OS_CHROMEOS) && defined(USE_X11)
11 #include "ui/base/ime/input_method_ibus.h" 11 #include "ui/base/ime/input_method_ibus.h"
12 #elif defined(OS_WIN) 12 #elif defined(OS_WIN)
13 #include "base/win/metro.h" 13 #include "base/win/metro.h"
14 #include "ui/base/ime/input_method_imm32.h" 14 #include "ui/base/ime/input_method_imm32.h"
15 #include "ui/base/ime/input_method_tsf.h" 15 #include "ui/base/ime/input_method_tsf.h"
16 #include "ui/base/ime/remote_input_method_win.h" 16 #include "ui/base/ime/remote_input_method_win.h"
17 #elif defined(USE_AURA) && defined(USE_X11) 17 #elif defined(USE_AURA)
Yuki 2013/12/11 09:31:14 Better to be defined(USE_AURA) && defined(OS_LINUX
18 #include "ui/base/ime/input_method_auralinux.h" 18 #include "ui/base/ime/input_method_auralinux.h"
19 #else 19 #else
20 #include "ui/base/ime/input_method_minimal.h" 20 #include "ui/base/ime/input_method_minimal.h"
21 #endif 21 #endif
22 22
23 namespace { 23 namespace {
24 24
25 ui::InputMethodFactory* g_input_method_factory = NULL; 25 ui::InputMethodFactory* g_input_method_factory = NULL;
26 26
27 #if defined(OS_WIN) 27 #if defined(OS_WIN)
(...skipping 28 matching lines...) Expand all
56 internal::InputMethodDelegate* delegate, 56 internal::InputMethodDelegate* delegate,
57 gfx::AcceleratedWidget widget) { 57 gfx::AcceleratedWidget widget) {
58 #if defined(OS_CHROMEOS) && defined(USE_X11) 58 #if defined(OS_CHROMEOS) && defined(USE_X11)
59 return scoped_ptr<InputMethod>(new InputMethodIBus(delegate)); 59 return scoped_ptr<InputMethod>(new InputMethodIBus(delegate));
60 #elif defined(OS_WIN) 60 #elif defined(OS_WIN)
61 if (base::win::IsTSFAwareRequired()) 61 if (base::win::IsTSFAwareRequired())
62 return scoped_ptr<InputMethod>(new InputMethodTSF(delegate, widget)); 62 return scoped_ptr<InputMethod>(new InputMethodTSF(delegate, widget));
63 if (IsRemoteInputMethodWinRequired(widget)) 63 if (IsRemoteInputMethodWinRequired(widget))
64 return CreateRemoteInputMethodWin(delegate); 64 return CreateRemoteInputMethodWin(delegate);
65 return scoped_ptr<InputMethod>(new InputMethodIMM32(delegate, widget)); 65 return scoped_ptr<InputMethod>(new InputMethodIMM32(delegate, widget));
66 #elif defined(USE_AURA) && defined(USE_X11) 66 #elif defined(USE_AURA)
Yuki 2013/12/11 09:31:14 Ditto.
67 return scoped_ptr<InputMethod>(new InputMethodAuraLinux(delegate)); 67 return scoped_ptr<InputMethod>(new InputMethodAuraLinux(delegate));
68 #else 68 #else
69 return scoped_ptr<InputMethod>(new InputMethodMinimal(delegate)); 69 return scoped_ptr<InputMethod>(new InputMethodMinimal(delegate));
70 #endif 70 #endif
71 } 71 }
72 72
73 // MockInputMethodFactory 73 // MockInputMethodFactory
74 74
75 // static 75 // static
76 MockInputMethodFactory* MockInputMethodFactory::GetInstance() { 76 MockInputMethodFactory* MockInputMethodFactory::GetInstance() {
(...skipping 29 matching lines...) Expand all
106 106
107 void DestroySharedInputMethod() { 107 void DestroySharedInputMethod() {
108 delete g_shared_input_method; 108 delete g_shared_input_method;
109 g_shared_input_method = NULL; 109 g_shared_input_method = NULL;
110 } 110 }
111 111
112 } // namespace internal 112 } // namespace internal
113 #endif 113 #endif
114 114
115 } // namespace ui 115 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698