| 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_WIN_TSF_BRIDGE_H_ | 5 #ifndef UI_BASE_IME_WIN_TSF_BRIDGE_H_ |
| 6 #define UI_BASE_IME_WIN_TSF_BRIDGE_H_ | 6 #define UI_BASE_IME_WIN_TSF_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <Windows.h> | 8 #include <Windows.h> |
| 9 #include <msctf.h> | 9 #include <msctf.h> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 static TSFBridge* ReplaceForTesting(TSFBridge* bridge); | 44 static TSFBridge* ReplaceForTesting(TSFBridge* bridge); |
| 45 | 45 |
| 46 // Destroys the thread local instance. | 46 // Destroys the thread local instance. |
| 47 virtual void Shutdown() = 0; | 47 virtual void Shutdown() = 0; |
| 48 | 48 |
| 49 // Handles TextInputTypeChanged event. RWHVW is responsible for calling this | 49 // Handles TextInputTypeChanged event. RWHVW is responsible for calling this |
| 50 // handler whenever renderer's input text type is changed. Does nothing | 50 // handler whenever renderer's input text type is changed. Does nothing |
| 51 // unless |client| is focused. | 51 // unless |client| is focused. |
| 52 virtual void OnTextInputTypeChanged(TextInputClient* client) = 0; | 52 virtual void OnTextInputTypeChanged(TextInputClient* client) = 0; |
| 53 | 53 |
| 54 // Sends an event to TSF manager that the text layout should be updated. | |
| 55 virtual void OnTextLayoutChanged() = 0; | |
| 56 | |
| 57 // Cancels the ongoing composition if exists. | 54 // Cancels the ongoing composition if exists. |
| 58 // Returns false if an error occurs. | 55 // Returns false if an error occures. |
| 59 virtual bool CancelComposition() = 0; | 56 virtual bool CancelComposition() = 0; |
| 60 | 57 |
| 61 // Sets currently focused TextInputClient. | 58 // Sets currently focused TextInputClient. |
| 62 // Caller must free |client|. | 59 // Caller must free |client|. |
| 63 virtual void SetFocusedClient(HWND focused_window, | 60 virtual void SetFocusedClient(HWND focused_window, |
| 64 TextInputClient* client) = 0; | 61 TextInputClient* client) = 0; |
| 65 | 62 |
| 66 // Removes currently focused TextInputClient. | 63 // Removes currently focused TextInputClient. |
| 67 // Caller must free |client|. | 64 // Caller must free |client|. |
| 68 virtual void RemoveFocusedClient(TextInputClient* client) = 0; | 65 virtual void RemoveFocusedClient(TextInputClient* client) = 0; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 80 private: | 77 private: |
| 81 // Releases TLS instance. | 78 // Releases TLS instance. |
| 82 static void Finalize(void* data); | 79 static void Finalize(void* data); |
| 83 | 80 |
| 84 DISALLOW_COPY_AND_ASSIGN(TSFBridge); | 81 DISALLOW_COPY_AND_ASSIGN(TSFBridge); |
| 85 }; | 82 }; |
| 86 | 83 |
| 87 } // namespace ui | 84 } // namespace ui |
| 88 | 85 |
| 89 #endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_ | 86 #endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_ |
| OLD | NEW |