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

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: 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') | ui/base/ime/win/tsf_bridge.cc » ('J')
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 OnTextInputTypeChanged(focused); 112 OnTextInputTypeChanged(focused);
113 113
114 // Force to update caret bounds, in case the client thinks that the caret 114 // Force to update caret bounds, in case the client thinks that the caret
115 // bounds has not changed. 115 // bounds has not changed.
116 OnCaretBoundsChanged(focused); 116 OnCaretBoundsChanged(focused);
117 } 117 }
118 } 118 }
119 119
120 void InputMethodTSF::ConfirmCompositionText() { 120 void InputMethodTSF::ConfirmCompositionText() {
121 if (!IsTextInputTypeNone()) { 121 if (!IsTextInputTypeNone()) {
122 // TSFBridge has not implemented ConfirmComposition yet. So here cancel 122 ui::TSFBridge::GetInstance()->ConfirmComposition();
123 // the composition instead as a workaround.
124 // TODO(ime): Implement ConfirmComposition for TSF.
125 ui::TSFBridge::GetInstance()->CancelComposition();
126 } 123 }
127 } 124 }
128 125
129 bool InputMethodTSF::IsWindowFocused(const TextInputClient* client) const { 126 bool InputMethodTSF::IsWindowFocused(const TextInputClient* client) const {
130 if (!client) 127 if (!client)
131 return false; 128 return false;
132 HWND attached_window_handle = GetAttachedWindowHandle(client); 129 HWND attached_window_handle = GetAttachedWindowHandle(client);
133 return attached_window_handle && GetFocus() == attached_window_handle; 130 return attached_window_handle && GetFocus() == attached_window_handle;
134 } 131 }
135 132
136 } // namespace ui 133 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/base/ime/win/mock_tsf_bridge.h » ('j') | ui/base/ime/win/tsf_bridge.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698