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

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

Issue 48393003: Add InputMethodObserver support into InputMethodBase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix -Werror=sign-compare Created 7 years, 1 month 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/input_method_linux_x11.cc ('k') | ui/base/ime/input_method_win.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) 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 #include "ui/base/ime/win/tsf_event_router.h" 9 #include "ui/base/ime/win/tsf_event_router.h"
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if (IsTextInputClientFocused(client) && IsWindowFocused(client)) { 101 if (IsTextInputClientFocused(client) && IsWindowFocused(client)) {
102 ui::TSFBridge::GetInstance()->CancelComposition(); 102 ui::TSFBridge::GetInstance()->CancelComposition();
103 ui::TSFBridge::GetInstance()->OnTextInputTypeChanged(client); 103 ui::TSFBridge::GetInstance()->OnTextInputTypeChanged(client);
104 } 104 }
105 InputMethodWin::OnTextInputTypeChanged(client); 105 InputMethodWin::OnTextInputTypeChanged(client);
106 } 106 }
107 107
108 void InputMethodTSF::OnCaretBoundsChanged(const TextInputClient* client) { 108 void InputMethodTSF::OnCaretBoundsChanged(const TextInputClient* client) {
109 if (IsTextInputClientFocused(client) && IsWindowFocused(client)) 109 if (IsTextInputClientFocused(client) && IsWindowFocused(client))
110 ui::TSFBridge::GetInstance()->OnTextLayoutChanged(); 110 ui::TSFBridge::GetInstance()->OnTextLayoutChanged();
111 InputMethodWin::OnCaretBoundsChanged(client);
111 } 112 }
112 113
113 void InputMethodTSF::CancelComposition(const TextInputClient* client) { 114 void InputMethodTSF::CancelComposition(const TextInputClient* client) {
114 if (IsTextInputClientFocused(client) && IsWindowFocused(client)) 115 if (IsTextInputClientFocused(client) && IsWindowFocused(client))
115 ui::TSFBridge::GetInstance()->CancelComposition(); 116 ui::TSFBridge::GetInstance()->CancelComposition();
116 } 117 }
117 118
118 void InputMethodTSF::DetachTextInputClient(TextInputClient* client) { 119 void InputMethodTSF::DetachTextInputClient(TextInputClient* client) {
119 InputMethodWin::DetachTextInputClient(client); 120 InputMethodWin::DetachTextInputClient(client);
120 ui::TSFBridge::GetInstance()->RemoveFocusedClient(client); 121 ui::TSFBridge::GetInstance()->RemoveFocusedClient(client);
(...skipping 27 matching lines...) Expand all
148 OnCaretBoundsChanged(focused); 149 OnCaretBoundsChanged(focused);
149 } 150 }
150 } 151 }
151 152
152 void InputMethodTSF::ConfirmCompositionText() { 153 void InputMethodTSF::ConfirmCompositionText() {
153 if (!IsTextInputTypeNone()) 154 if (!IsTextInputTypeNone())
154 ui::TSFBridge::GetInstance()->ConfirmComposition(); 155 ui::TSFBridge::GetInstance()->ConfirmComposition();
155 } 156 }
156 157
157 } // namespace ui 158 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_linux_x11.cc ('k') | ui/base/ime/input_method_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698