| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef UI_BASE_IME_INPUT_METHOD_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_H_ |
| 6 #define UI_BASE_IME_INPUT_METHOD_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // - Keeps track of the focused TextInputClient to see which client can call | 43 // - Keeps track of the focused TextInputClient to see which client can call |
| 44 // APIs, OnTextInputTypeChanged, OnCaretBoundsChanged, and CancelComposition, | 44 // APIs, OnTextInputTypeChanged, OnCaretBoundsChanged, and CancelComposition, |
| 45 // that change the state of the input method. | 45 // that change the state of the input method. |
| 46 // In Aura environment, aura::RootWindowHost creates an instance of | 46 // In Aura environment, aura::RootWindowHost creates an instance of |
| 47 // ui::InputMethod and owns it. | 47 // ui::InputMethod and owns it. |
| 48 class UI_EXPORT InputMethod { | 48 class UI_EXPORT InputMethod { |
| 49 public: | 49 public: |
| 50 virtual ~InputMethod() {} | 50 virtual ~InputMethod() {} |
| 51 | 51 |
| 52 // Sets the delegate used by this InputMethod instance. It should only be | 52 // Sets the delegate used by this InputMethod instance. It should only be |
| 53 // called by an object which manages the whole UI (e.g. aura::RootWindowHost). | 53 // called by an object which manages the whole UI. |
| 54 virtual void SetDelegate(internal::InputMethodDelegate* delegate) = 0; | 54 virtual void SetDelegate(internal::InputMethodDelegate* delegate) = 0; |
| 55 | 55 |
| 56 // Initializes the InputMethod object. Pass true if the system toplevel window | 56 // Initializes the InputMethod object. Pass true if the system toplevel window |
| 57 // already has keyboard focus. | 57 // already has keyboard focus. |
| 58 virtual void Init(bool focused) = 0; | 58 virtual void Init(bool focused) = 0; |
| 59 | 59 |
| 60 // Called when the top-level system window gets keyboard focus. | 60 // Called when the top-level system window gets keyboard focus. |
| 61 virtual void OnFocus() = 0; | 61 virtual void OnFocus() = 0; |
| 62 | 62 |
| 63 // Called when the top-level system window loses keyboard focus. | 63 // Called when the top-level system window loses keyboard focus. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 virtual bool IsActive() = 0; | 115 virtual bool IsActive() = 0; |
| 116 | 116 |
| 117 // Gets the text input type of the focused text input client. Returns | 117 // Gets the text input type of the focused text input client. Returns |
| 118 // ui::TEXT_INPUT_TYPE_NONE if there is no focused client. | 118 // ui::TEXT_INPUT_TYPE_NONE if there is no focused client. |
| 119 virtual TextInputType GetTextInputType() const = 0; | 119 virtual TextInputType GetTextInputType() const = 0; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace ui | 122 } // namespace ui |
| 123 | 123 |
| 124 #endif // UI_BASE_IME_INPUT_METHOD_H_ | 124 #endif // UI_BASE_IME_INPUT_METHOD_H_ |
| OLD | NEW |