| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // focused client. | 118 // focused client. |
| 119 virtual void CancelComposition(const TextInputClient* client) = 0; | 119 virtual void CancelComposition(const TextInputClient* client) = 0; |
| 120 | 120 |
| 121 // Called by the focused client whenever its input locale is changed. | 121 // Called by the focused client whenever its input locale is changed. |
| 122 // This method is currently used only on Windows. | 122 // This method is currently used only on Windows. |
| 123 // This method does not take a parameter of TextInputClient for historical | 123 // This method does not take a parameter of TextInputClient for historical |
| 124 // reasons. | 124 // reasons. |
| 125 // TODO(ime): Consider to take a parameter of TextInputClient. | 125 // TODO(ime): Consider to take a parameter of TextInputClient. |
| 126 virtual void OnInputLocaleChanged() = 0; | 126 virtual void OnInputLocaleChanged() = 0; |
| 127 | 127 |
| 128 // Returns the locale of current keyboard layout or input method, as a BCP-47 | 128 // Returns whether the system input locale is in CJK languages. |
| 129 // tag, or an empty string if the input method cannot provide it. | 129 // This is only used in Windows platforms. |
| 130 virtual std::string GetInputLocale() = 0; | 130 virtual bool IsInputLocaleCJK() const = 0; |
| 131 | 131 |
| 132 // TODO(yoichio): Following 3 methods(GetTextInputType, GetTextInputMode and | 132 // TODO(yoichio): Following 3 methods(GetTextInputType, GetTextInputMode and |
| 133 // CanComposeInline) calls client's same method and returns its value. It is | 133 // CanComposeInline) calls client's same method and returns its value. It is |
| 134 // not InputMethod itself's infomation. So rename these to | 134 // not InputMethod itself's infomation. So rename these to |
| 135 // GetClientTextInputType and so on. | 135 // GetClientTextInputType and so on. |
| 136 // Gets the text input type of the focused text input client. Returns | 136 // Gets the text input type of the focused text input client. Returns |
| 137 // ui::TEXT_INPUT_TYPE_NONE if there is no focused client. | 137 // ui::TEXT_INPUT_TYPE_NONE if there is no focused client. |
| 138 virtual TextInputType GetTextInputType() const = 0; | 138 virtual TextInputType GetTextInputType() const = 0; |
| 139 | 139 |
| 140 // Gets the text input mode of the focused text input client. Returns | 140 // Gets the text input mode of the focused text input client. Returns |
| (...skipping 26 matching lines...) Expand all Loading... |
| 167 virtual const std::vector<std::unique_ptr<ui::KeyEvent>>& | 167 virtual const std::vector<std::unique_ptr<ui::KeyEvent>>& |
| 168 GetKeyEventsForTesting() = 0; | 168 GetKeyEventsForTesting() = 0; |
| 169 | 169 |
| 170 // Whether the key events will be tracked. Only used for testing. | 170 // Whether the key events will be tracked. Only used for testing. |
| 171 bool track_key_events_for_testing_; | 171 bool track_key_events_for_testing_; |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 } // namespace ui | 174 } // namespace ui |
| 175 | 175 |
| 176 #endif // UI_BASE_IME_INPUT_METHOD_H_ | 176 #endif // UI_BASE_IME_INPUT_METHOD_H_ |
| OLD | NEW |