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 26 matching lines...) Expand all Loading... |
37 // Sets the thread local instance. Must be called before any calls to | 37 // Sets the thread local instance. Must be called before any calls to |
38 // GetInstance(). | 38 // GetInstance(). |
39 static bool Initialize(); | 39 static bool Initialize(); |
40 | 40 |
41 // Injects an alternative TSFBridge such as MockTSFBridge for testing. The | 41 // Injects an alternative TSFBridge such as MockTSFBridge for testing. The |
42 // injected object should be released by the caller. This function returns | 42 // injected object should be released by the caller. This function returns |
43 // previous TSFBridge pointer with ownership. | 43 // previous TSFBridge pointer with ownership. |
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 static void Shutdown(); |
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. | 54 // Sends an event to TSF manager that the text layout should be updated. |
55 virtual void OnTextLayoutChanged() = 0; | 55 virtual void OnTextLayoutChanged() = 0; |
56 | 56 |
57 // Cancels the ongoing composition if exists. | 57 // Cancels the ongoing composition if exists. |
(...skipping 22 matching lines...) Expand all Loading... |
80 private: | 80 private: |
81 // Releases TLS instance. | 81 // Releases TLS instance. |
82 static void Finalize(void* data); | 82 static void Finalize(void* data); |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(TSFBridge); | 84 DISALLOW_COPY_AND_ASSIGN(TSFBridge); |
85 }; | 85 }; |
86 | 86 |
87 } // namespace ui | 87 } // namespace ui |
88 | 88 |
89 #endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_ | 89 #endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_ |
OLD | NEW |