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

Side by Side Diff: ui/base/ime/input_method_tsf.cc

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 | « no previous file | ui/base/ime/win/mock_tsf_bridge.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "ui/base/ime/input_method_tsf.h" 5 #include "ui/base/ime/input_method_tsf.h"
6 6
7 #include "ui/base/ime/text_input_client.h" 7 #include "ui/base/ime/text_input_client.h"
8 #include "ui/base/ime/win/tsf_bridge.h" 8 #include "ui/base/ime/win/tsf_bridge.h"
9 9
10 namespace ui { 10 namespace ui {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // focus and after it acquires focus again are the same. 116 // focus and after it acquires focus again are the same.
117 OnTextInputTypeChanged(focused); 117 OnTextInputTypeChanged(focused);
118 118
119 // Force to update caret bounds, in case the client thinks that the caret 119 // Force to update caret bounds, in case the client thinks that the caret
120 // bounds has not changed. 120 // bounds has not changed.
121 OnCaretBoundsChanged(focused); 121 OnCaretBoundsChanged(focused);
122 } 122 }
123 } 123 }
124 124
125 void InputMethodTSF::ConfirmCompositionText() { 125 void InputMethodTSF::ConfirmCompositionText() {
126 if (!IsTextInputTypeNone()) { 126 if (!IsTextInputTypeNone())
127 // TSFBridge has not implemented ConfirmComposition yet. So here cancel 127 ui::TSFBridge::GetInstance()->ConfirmComposition();
128 // the composition instead as a workaround.
129 // TODO(ime): Implement ConfirmComposition for TSF.
130 ui::TSFBridge::GetInstance()->CancelComposition();
131 }
132 } 128 }
133 129
134 bool InputMethodTSF::IsWindowFocused(const TextInputClient* client) const { 130 bool InputMethodTSF::IsWindowFocused(const TextInputClient* client) const {
135 if (!client) 131 if (!client)
136 return false; 132 return false;
137 HWND attached_window_handle = GetAttachedWindowHandle(client); 133 HWND attached_window_handle = GetAttachedWindowHandle(client);
138 return attached_window_handle && GetFocus() == attached_window_handle; 134 return attached_window_handle && GetFocus() == attached_window_handle;
139 } 135 }
140 136
141 } // namespace ui 137 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/base/ime/win/mock_tsf_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698