| 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> |
| 10 |
| 9 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/win/scoped_comptr.h" |
| 10 #include "ui/base/ui_export.h" | 13 #include "ui/base/ui_export.h" |
| 11 | 14 |
| 12 namespace ui { | 15 namespace ui { |
| 13 class TextInputClient; | 16 class TextInputClient; |
| 14 | 17 |
| 15 // TsfBridge provides high level IME related operations on top of Text Services | 18 // 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 | 19 // 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. | 20 // 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. | 21 // 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 | 22 // 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 | 57 |
| 55 // Sets currently focused TextInputClient. | 58 // Sets currently focused TextInputClient. |
| 56 // Caller must free |client|. | 59 // Caller must free |client|. |
| 57 virtual void SetFocusedClient(HWND focused_window, | 60 virtual void SetFocusedClient(HWND focused_window, |
| 58 TextInputClient* client) = 0; | 61 TextInputClient* client) = 0; |
| 59 | 62 |
| 60 // Removes currently focused TextInputClient. | 63 // Removes currently focused TextInputClient. |
| 61 // Caller must free |client|. | 64 // Caller must free |client|. |
| 62 virtual void RemoveFocusedClient(TextInputClient* client) = 0; | 65 virtual void RemoveFocusedClient(TextInputClient* client) = 0; |
| 63 | 66 |
| 67 // Obtains current thread manager. |
| 68 virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() = 0; |
| 69 |
| 64 protected: | 70 protected: |
| 65 // Uses GetInstance() instead. | 71 // Uses GetInstance() instead. |
| 66 TsfBridge(); | 72 TsfBridge(); |
| 67 | 73 |
| 68 private: | 74 private: |
| 69 DISALLOW_COPY_AND_ASSIGN(TsfBridge); | 75 DISALLOW_COPY_AND_ASSIGN(TsfBridge); |
| 70 }; | 76 }; |
| 71 | 77 |
| 72 } // namespace ui | 78 } // namespace ui |
| 73 | 79 |
| 74 #endif // UI_BASE_WIN_TSF_BRIDGE_H_ | 80 #endif // UI_BASE_WIN_TSF_BRIDGE_H_ |
| OLD | NEW |