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

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

Issue 158483003: Logically revert r206996, which is no longer used in the era of Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error Created 6 years, 10 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/input_method_factory.h ('k') | ui/base/ime/input_method_initializer.cc » ('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 "ui/base/ime/mock_input_method.h" 7 #include "ui/base/ime/mock_input_method.h"
8 8
9 #if defined(OS_CHROMEOS) && defined(USE_X11) 9 #if defined(OS_CHROMEOS) && defined(USE_X11)
10 #include "ui/base/ime/input_method_chromeos.h" 10 #include "ui/base/ime/input_method_chromeos.h"
11 #elif defined(OS_WIN) 11 #elif defined(OS_WIN)
12 #include "base/win/metro.h" 12 #include "base/win/metro.h"
13 #include "ui/base/ime/input_method_imm32.h" 13 #include "ui/base/ime/input_method_imm32.h"
14 #include "ui/base/ime/remote_input_method_win.h" 14 #include "ui/base/ime/remote_input_method_win.h"
15 #elif defined(USE_AURA) && defined(OS_LINUX) 15 #elif defined(USE_AURA) && defined(OS_LINUX)
16 #include "ui/base/ime/input_method_auralinux.h" 16 #include "ui/base/ime/input_method_auralinux.h"
17 #else 17 #else
18 #include "ui/base/ime/input_method_minimal.h" 18 #include "ui/base/ime/input_method_minimal.h"
19 #endif 19 #endif
20 20
21 namespace { 21 namespace {
22 22
23 bool g_input_method_set_for_testing = false; 23 bool g_input_method_set_for_testing = false;
24 24
25 bool g_create_input_method_called = false; 25 bool g_create_input_method_called = false;
26 26
27 #if defined(OS_WIN)
28 ui::InputMethod* g_shared_input_method = NULL;
29 #endif
30
31 } // namespace 27 } // namespace
32 28
33 namespace ui { 29 namespace ui {
34 30
35 scoped_ptr<InputMethod> CreateInputMethod( 31 scoped_ptr<InputMethod> CreateInputMethod(
36 internal::InputMethodDelegate* delegate, 32 internal::InputMethodDelegate* delegate,
37 gfx::AcceleratedWidget widget) { 33 gfx::AcceleratedWidget widget) {
38 if (!g_create_input_method_called) 34 if (!g_create_input_method_called)
39 g_create_input_method_called = true; 35 g_create_input_method_called = true;
40 36
(...skipping 18 matching lines...) Expand all
59 return; 55 return;
60 56
61 CHECK(!g_create_input_method_called) 57 CHECK(!g_create_input_method_called)
62 << "ui::SetUpInputMethodFactoryForTesting was called after use of " 58 << "ui::SetUpInputMethodFactoryForTesting was called after use of "
63 << "ui::CreateInputMethod. You must call " 59 << "ui::CreateInputMethod. You must call "
64 << "ui::SetUpInputMethodFactoryForTesting earlier."; 60 << "ui::SetUpInputMethodFactoryForTesting earlier.";
65 61
66 g_input_method_set_for_testing = true; 62 g_input_method_set_for_testing = true;
67 } 63 }
68 64
69 #if defined(OS_WIN)
70 InputMethod* GetSharedInputMethod() {
71 if (!g_shared_input_method)
72 g_shared_input_method = CreateInputMethod(NULL, NULL).release();
73 return g_shared_input_method;
74 }
75
76 namespace internal {
77
78 void DestroySharedInputMethod() {
79 delete g_shared_input_method;
80 g_shared_input_method = NULL;
81 }
82
83 } // namespace internal
84 #endif
85
86 } // namespace ui 65 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_factory.h ('k') | ui/base/ime/input_method_initializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698