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 3 // found in the LICENSE file. 4 5 #include "chromeos/ime/input_method_manager.h" 6 7 #include "base/logging.h" 8 9 namespace chromeos { 10 namespace input_method { 11 12 namespace { 13 InputMethodManager* g_input_method_manager = NULL; 14 } 15 16 // static 17 InputMethodManager* InputMethodManager::Get() { 18 return g_input_method_manager; 19 } 20 21 // static 22 void InputMethodManager::Initialize(InputMethodManager* instance) { 23 DCHECK(!g_input_method_manager) << "Do not call Initialize() multiple times."; 24 g_input_method_manager = instance; 25 } 26 27 // static 28 void InputMethodManager::Shutdown() { 29 DCHECK(g_input_method_manager) 30 << "InputMethodManager() is not initialized."; 31 delete g_input_method_manager; 32 g_input_method_manager = NULL; 33 } 34 35 } // namespace input_method 36 } // namespace chromeos 37