11e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 21e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 31e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// found in the LICENSE file. 41e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 51e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)#include "ui/base/ime/linux/linux_input_method_context_factory.h" 61e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 71e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)namespace { 81e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 91e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)const ui::LinuxInputMethodContextFactory* g_linux_input_method_context_factory = 101e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) NULL; 111e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 121e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)} // namespace 131e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 141e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)namespace ui { 151e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 161e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// static 171e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)const LinuxInputMethodContextFactory* 181e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)LinuxInputMethodContextFactory::instance() { 191e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) return g_linux_input_method_context_factory; 201e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)} 211e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 221e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)// static 231e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)void LinuxInputMethodContextFactory::SetInstance( 241e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) const LinuxInputMethodContextFactory* instance) { 251e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) g_linux_input_method_context_factory = instance; 261e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)} 271e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 281e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)} // namespace ui 29