1 // Copyright (c) 2011 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.
5 #ifndef UI_BASE_IME_INPUT_METHOD_FACTORY_H_
6 #define UI_BASE_IME_INPUT_METHOD_FACTORY_H_
8 #include "ui/base/ui_export.h"
9 #include "ui/gfx/native_widget_types.h"
16 class InputMethodDelegate;
17 } // namespace internal
19 // Creates and returns an input method implementation for the platform. Caller
20 // must delete the object. The object does not own |delegate|.
21 UI_EXPORT InputMethod* CreateInputMethod(
22 internal::InputMethodDelegate* delegate,
23 gfx::AcceleratedWidget widget);
25 // With calling this function, CreateInputMethod will return MockInputMethod.
26 UI_EXPORT void SetUpInputMethodFactoryForTesting();
28 // Returns a shared input method object for the platform. Caller must not
29 // delete the object. Currently supported only on Windows. This method is
30 // for non-Aura environment, where only one input method object is created for
31 // the browser process.
32 UI_EXPORT InputMethod* GetSharedInputMethod();
35 // Destroys the shared input method object returned by GetSharedInputMethod().
36 // This function must be called only from input_method_initializer.cc.
37 void DestroySharedInputMethod();
38 } // namespace internal
42 #endif // UI_BASE_IME_INPUT_METHOD_FACTORY_H_