Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: ui/base/ime/win/tsf_bridge.h

Issue 16901011: Support CancelCompositionText/ComfirmCompositionText in TSF (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix a typo Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/ime/win/mock_tsf_bridge.cc ('k') | ui/base/ime/win/tsf_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(const TextInputClient* client) = 0; 52 virtual void OnTextInputTypeChanged(const 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.
58 // Returns true if there is no composition.
59 // Returns false if an edit session is on-going.
58 // Returns false if an error occures. 60 // Returns false if an error occures.
59 virtual bool CancelComposition() = 0; 61 virtual bool CancelComposition() = 0;
60 62
63 // Confirms the ongoing composition if exists.
64 // Returns true if there is no composition.
65 // Returns false if an edit session is on-going.
66 // Returns false if an error occures.
67 virtual bool ConfirmComposition() = 0;
68
61 // Sets currently focused TextInputClient. 69 // Sets currently focused TextInputClient.
62 // Caller must free |client|. 70 // Caller must free |client|.
63 virtual void SetFocusedClient(HWND focused_window, 71 virtual void SetFocusedClient(HWND focused_window,
64 TextInputClient* client) = 0; 72 TextInputClient* client) = 0;
65 73
66 // Removes currently focused TextInputClient. 74 // Removes currently focused TextInputClient.
67 // Caller must free |client|. 75 // Caller must free |client|.
68 virtual void RemoveFocusedClient(TextInputClient* client) = 0; 76 virtual void RemoveFocusedClient(TextInputClient* client) = 0;
69 77
70 // Obtains current thread manager. 78 // Obtains current thread manager.
71 virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() = 0; 79 virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() = 0;
72 80
73 // Returns the focused text input client. 81 // Returns the focused text input client.
74 virtual TextInputClient* GetFocusedTextInputClient() const = 0; 82 virtual TextInputClient* GetFocusedTextInputClient() const = 0;
75 83
76 protected: 84 protected:
77 // Uses GetInstance() instead. 85 // Uses GetInstance() instead.
78 TSFBridge(); 86 TSFBridge();
79 87
80 private: 88 private:
81 // Releases TLS instance. 89 // Releases TLS instance.
82 static void Finalize(void* data); 90 static void Finalize(void* data);
83 91
84 DISALLOW_COPY_AND_ASSIGN(TSFBridge); 92 DISALLOW_COPY_AND_ASSIGN(TSFBridge);
85 }; 93 };
86 94
87 } // namespace ui 95 } // namespace ui
88 96
89 #endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_ 97 #endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_
OLDNEW
« no previous file with comments | « ui/base/ime/win/mock_tsf_bridge.cc ('k') | ui/base/ime/win/tsf_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698