| 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_BASE_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_BASE_H_ |
| 6 #define UI_BASE_IME_INPUT_METHOD_BASE_H_ | 6 #define UI_BASE_IME_INPUT_METHOD_BASE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 TextInputClient* focused) {} | 62 TextInputClient* focused) {} |
| 63 virtual void OnDidChangeFocusedClient(TextInputClient* focused_before, | 63 virtual void OnDidChangeFocusedClient(TextInputClient* focused_before, |
| 64 TextInputClient* focused) {} | 64 TextInputClient* focused) {} |
| 65 | 65 |
| 66 // IMEInputContextHandlerInterface: | 66 // IMEInputContextHandlerInterface: |
| 67 void CommitText(const std::string& text) override; | 67 void CommitText(const std::string& text) override; |
| 68 void UpdateCompositionText(const CompositionText& text, | 68 void UpdateCompositionText(const CompositionText& text, |
| 69 uint32_t cursor_pos, | 69 uint32_t cursor_pos, |
| 70 bool visible) override; | 70 bool visible) override; |
| 71 void DeleteSurroundingText(int32_t offset, uint32_t length) override; | 71 void DeleteSurroundingText(int32_t offset, uint32_t length) override; |
| 72 void SendKeyEvent(KeyEvent* event) override; |
| 72 | 73 |
| 73 // Sends a fake key event for IME composing without physical key events. | 74 // Sends a fake key event for IME composing without physical key events. |
| 74 // Returns true if the faked key event is stopped propagation. | 75 // Returns true if the faked key event is stopped propagation. |
| 75 bool SendFakeProcessKeyEvent(bool pressed) const; | 76 bool SendFakeProcessKeyEvent(bool pressed) const; |
| 76 | 77 |
| 77 // Returns true if |client| is currently focused. | 78 // Returns true if |client| is currently focused. |
| 78 bool IsTextInputClientFocused(const TextInputClient* client); | 79 bool IsTextInputClientFocused(const TextInputClient* client); |
| 79 | 80 |
| 80 // Checks if the focused text input client's text input type is | 81 // Checks if the focused text input client's text input type is |
| 81 // TEXT_INPUT_TYPE_NONE. Also returns true if there is no focused text | 82 // TEXT_INPUT_TYPE_NONE. Also returns true if there is no focused text |
| (...skipping 27 matching lines...) Expand all Loading... |
| 109 TextInputClient* text_input_client_; | 110 TextInputClient* text_input_client_; |
| 110 | 111 |
| 111 base::ObserverList<InputMethodObserver> observer_list_; | 112 base::ObserverList<InputMethodObserver> observer_list_; |
| 112 | 113 |
| 113 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); | 114 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 } // namespace ui | 117 } // namespace ui |
| 117 | 118 |
| 118 #endif // UI_BASE_IME_INPUT_METHOD_BASE_H_ | 119 #endif // UI_BASE_IME_INPUT_METHOD_BASE_H_ |
| OLD | NEW |