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/chromeos/input_method_manager.h" | 5 #include "ui/base/ime/chromeos/input_method_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace chromeos { | 9 namespace chromeos { |
10 namespace input_method { | 10 namespace input_method { |
11 | 11 |
12 namespace { | 12 namespace { |
13 InputMethodManager* g_input_method_manager = NULL; | 13 InputMethodManager* g_input_method_manager = NULL; |
14 } | 14 } |
15 | 15 |
16 InputMethodManager::State::~State() { | 16 InputMethodManager::State::~State() { |
17 } | 17 } |
18 | 18 |
19 InputMethodManager::MenuItem::MenuItem() {} | 19 InputMethodManager::MenuItem::MenuItem() {} |
20 | 20 |
| 21 InputMethodManager::MenuItem::MenuItem(const MenuItem& other) = default; |
| 22 |
21 InputMethodManager::MenuItem::~MenuItem() {} | 23 InputMethodManager::MenuItem::~MenuItem() {} |
22 | 24 |
23 // static | 25 // static |
24 InputMethodManager* InputMethodManager::Get() { | 26 InputMethodManager* InputMethodManager::Get() { |
25 return g_input_method_manager; | 27 return g_input_method_manager; |
26 } | 28 } |
27 | 29 |
28 // static | 30 // static |
29 void InputMethodManager::Initialize(InputMethodManager* instance) { | 31 void InputMethodManager::Initialize(InputMethodManager* instance) { |
30 DCHECK(!g_input_method_manager) << "Do not call Initialize() multiple times."; | 32 DCHECK(!g_input_method_manager) << "Do not call Initialize() multiple times."; |
31 g_input_method_manager = instance; | 33 g_input_method_manager = instance; |
32 } | 34 } |
33 | 35 |
34 // static | 36 // static |
35 void InputMethodManager::Shutdown() { | 37 void InputMethodManager::Shutdown() { |
36 DCHECK(g_input_method_manager) | 38 DCHECK(g_input_method_manager) |
37 << "InputMethodManager() is not initialized."; | 39 << "InputMethodManager() is not initialized."; |
38 delete g_input_method_manager; | 40 delete g_input_method_manager; |
39 g_input_method_manager = NULL; | 41 g_input_method_manager = NULL; |
40 } | 42 } |
41 | 43 |
42 } // namespace input_method | 44 } // namespace input_method |
43 } // namespace chromeos | 45 } // namespace chromeos |
OLD | NEW |