Home | History | Annotate | Download | only in ime
      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.
      4 
      5 #ifndef UI_BASE_IME_INPUT_METHOD_FACTORY_H_
      6 #define UI_BASE_IME_INPUT_METHOD_FACTORY_H_
      7 
      8 #include "ui/base/ui_export.h"
      9 #include "ui/gfx/native_widget_types.h"
     10 
     11 namespace ui {
     12 
     13 class InputMethod;
     14 
     15 namespace internal {
     16 class InputMethodDelegate;
     17 }  // namespace internal
     18 
     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);
     24 
     25 // With calling this function, CreateInputMethod will return MockInputMethod.
     26 UI_EXPORT void SetUpInputMethodFactoryForTesting();
     27 
     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();
     33 
     34 namespace internal {
     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
     39 
     40 }  // namespace ui;
     41 
     42 #endif  // UI_BASE_IME_INPUT_METHOD_FACTORY_H_
     43