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

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

Issue 1602403002: Revert of Remove remote tree host and some related input and metro_driver code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-3
Patch Set: Created 4 years, 11 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
« no previous file with comments | « ui/base/ime/BUILD.gn ('k') | ui/base/ime/remote_input_method_delegate_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "build/build_config.h" 7 #include "build/build_config.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) 10 #if defined(OS_CHROMEOS)
11 #include "ui/base/ime/input_method_chromeos.h" 11 #include "ui/base/ime/input_method_chromeos.h"
12 #elif defined(OS_WIN) 12 #elif defined(OS_WIN)
13 #include "ui/base/ime/input_method_win.h" 13 #include "ui/base/ime/input_method_win.h"
14 #include "ui/base/ime/remote_input_method_win.h"
14 #elif defined(OS_MACOSX) 15 #elif defined(OS_MACOSX)
15 #include "ui/base/ime/input_method_mac.h" 16 #include "ui/base/ime/input_method_mac.h"
16 #elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11) && \ 17 #elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11) && \
17 !defined(OS_CHROMEOS) 18 !defined(OS_CHROMEOS)
18 #include "ui/base/ime/input_method_auralinux.h" 19 #include "ui/base/ime/input_method_auralinux.h"
19 #elif defined(OS_ANDROID) 20 #elif defined(OS_ANDROID)
20 #include "ui/base/ime/input_method_android.h" 21 #include "ui/base/ime/input_method_android.h"
21 #else 22 #else
22 #include "ui/base/ime/input_method_minimal.h" 23 #include "ui/base/ime/input_method_minimal.h"
23 #endif 24 #endif
(...skipping 21 matching lines...) Expand all
45 g_input_method_for_testing = nullptr; 46 g_input_method_for_testing = nullptr;
46 return make_scoped_ptr(ret); 47 return make_scoped_ptr(ret);
47 } 48 }
48 49
49 if (g_input_method_set_for_testing) 50 if (g_input_method_set_for_testing)
50 return make_scoped_ptr(new MockInputMethod(delegate)); 51 return make_scoped_ptr(new MockInputMethod(delegate));
51 52
52 #if defined(OS_CHROMEOS) 53 #if defined(OS_CHROMEOS)
53 return make_scoped_ptr(new InputMethodChromeOS(delegate)); 54 return make_scoped_ptr(new InputMethodChromeOS(delegate));
54 #elif defined(OS_WIN) 55 #elif defined(OS_WIN)
56 if (IsRemoteInputMethodWinRequired(widget))
57 return CreateRemoteInputMethodWin(delegate);
55 return make_scoped_ptr(new InputMethodWin(delegate, widget)); 58 return make_scoped_ptr(new InputMethodWin(delegate, widget));
56 #elif defined(OS_MACOSX) 59 #elif defined(OS_MACOSX)
57 return make_scoped_ptr(new InputMethodMac(delegate)); 60 return make_scoped_ptr(new InputMethodMac(delegate));
58 #elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11) && \ 61 #elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11) && \
59 !defined(OS_CHROMEOS) 62 !defined(OS_CHROMEOS)
60 return make_scoped_ptr(new InputMethodAuraLinux(delegate)); 63 return make_scoped_ptr(new InputMethodAuraLinux(delegate));
61 #elif defined(OS_ANDROID) 64 #elif defined(OS_ANDROID)
62 return make_scoped_ptr(new InputMethodAndroid(delegate)); 65 return make_scoped_ptr(new InputMethodAndroid(delegate));
63 #else 66 #else
64 return make_scoped_ptr(new InputMethodMinimal(delegate)); 67 return make_scoped_ptr(new InputMethodMinimal(delegate));
(...skipping 10 matching lines...) Expand all
75 << "ui::SetUpInputMethodFactoryForTesting earlier."; 78 << "ui::SetUpInputMethodFactoryForTesting earlier.";
76 79
77 g_input_method_set_for_testing = true; 80 g_input_method_set_for_testing = true;
78 } 81 }
79 82
80 void SetUpInputMethodForTesting(InputMethod* input_method) { 83 void SetUpInputMethodForTesting(InputMethod* input_method) {
81 g_input_method_for_testing = input_method; 84 g_input_method_for_testing = input_method;
82 } 85 }
83 86
84 } // namespace ui 87 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/BUILD.gn ('k') | ui/base/ime/remote_input_method_delegate_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698