| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |