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

Side by Side Diff: chromeos/ime/input_method_manager.cc

Issue 419293002: IME refactoring: ChromeOS introduce input methods State. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit test fixed. Re-sorted methods of StateImpl and IMM. Created 6 years, 4 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
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 "chromeos/ime/input_method_manager.h" 5 #include "chromeos/ime/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() {
17 }
18
16 // static 19 // static
17 InputMethodManager* InputMethodManager::Get() { 20 InputMethodManager* InputMethodManager::Get() {
18 return g_input_method_manager; 21 return g_input_method_manager;
19 } 22 }
20 23
21 // static 24 // static
22 void InputMethodManager::Initialize(InputMethodManager* instance) { 25 void InputMethodManager::Initialize(InputMethodManager* instance) {
23 DCHECK(!g_input_method_manager) << "Do not call Initialize() multiple times."; 26 DCHECK(!g_input_method_manager) << "Do not call Initialize() multiple times.";
24 g_input_method_manager = instance; 27 g_input_method_manager = instance;
25 } 28 }
26 29
27 // static 30 // static
28 void InputMethodManager::Shutdown() { 31 void InputMethodManager::Shutdown() {
29 DCHECK(g_input_method_manager) 32 DCHECK(g_input_method_manager)
30 << "InputMethodManager() is not initialized."; 33 << "InputMethodManager() is not initialized.";
31 delete g_input_method_manager; 34 delete g_input_method_manager;
32 g_input_method_manager = NULL; 35 g_input_method_manager = NULL;
33 } 36 }
34 37
35 } // namespace input_method 38 } // namespace input_method
36 } // namespace chromeos 39 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/ime/input_method_manager.h ('k') | chromeos/ime/mock_component_extension_ime_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698