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_WIN_TSF_BRIDGE_H_ | 5 #ifndef UI_BASE_WIN_TSF_BRIDGE_H_ |
6 #define UI_BASE_WIN_TSF_BRIDGE_H_ | 6 #define UI_BASE_WIN_TSF_BRIDGE_H_ |
7 | 7 |
8 #include <Windows.h> | 8 #include <Windows.h> |
9 #include <msctf.h> | |
9 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
sky
2012/10/15 22:00:07
nit: newline between 9/10
Seigo Nonaka
2012/10/16 02:20:47
Done.
| |
11 #include "base/win/scoped_comptr.h" | |
10 #include "ui/base/ui_export.h" | 12 #include "ui/base/ui_export.h" |
11 | 13 |
12 namespace ui { | 14 namespace ui { |
13 class TextInputClient; | 15 class TextInputClient; |
14 | 16 |
15 // TsfBridge provides high level IME related operations on top of Text Services | 17 // TsfBridge provides high level IME related operations on top of Text Services |
16 // Framework (TSF). TsfBridge is managed by TLS because TSF related stuff is | 18 // Framework (TSF). TsfBridge is managed by TLS because TSF related stuff is |
17 // associated with each thread and not allowed to access across thread boundary. | 19 // associated with each thread and not allowed to access across thread boundary. |
18 // To be consistent with IMM32 behavior, TsfBridge is shared in the same thread. | 20 // To be consistent with IMM32 behavior, TsfBridge is shared in the same thread. |
19 // TsfBridge is used by the web content text inputting field, for example | 21 // TsfBridge is used by the web content text inputting field, for example |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 | 56 |
55 // Sets currently focused TextInputClient. | 57 // Sets currently focused TextInputClient. |
56 // Caller must free |client|. | 58 // Caller must free |client|. |
57 virtual void SetFocusedClient(HWND focused_window, | 59 virtual void SetFocusedClient(HWND focused_window, |
58 TextInputClient* client) = 0; | 60 TextInputClient* client) = 0; |
59 | 61 |
60 // Removes currently focused TextInputClient. | 62 // Removes currently focused TextInputClient. |
61 // Caller must free |client|. | 63 // Caller must free |client|. |
62 virtual void RemoveFocusedClient(TextInputClient* client) = 0; | 64 virtual void RemoveFocusedClient(TextInputClient* client) = 0; |
63 | 65 |
66 // Obtains current thread manager. | |
67 virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() = 0; | |
68 | |
64 protected: | 69 protected: |
65 // Uses GetInstance() instead. | 70 // Uses GetInstance() instead. |
66 TsfBridge(); | 71 TsfBridge(); |
67 | 72 |
68 private: | 73 private: |
69 DISALLOW_COPY_AND_ASSIGN(TsfBridge); | 74 DISALLOW_COPY_AND_ASSIGN(TsfBridge); |
70 }; | 75 }; |
71 | 76 |
72 } // namespace ui | 77 } // namespace ui |
73 | 78 |
74 #endif // UI_BASE_WIN_TSF_BRIDGE_H_ | 79 #endif // UI_BASE_WIN_TSF_BRIDGE_H_ |
OLD | NEW |