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

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

Issue 17112021: New method: InputMethod::IsCandidatePopupOpen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. 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/input_method_tsf.h ('k') | ui/base/ime/mock_input_method.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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 87
88 void InputMethodTSF::SetFocusedTextInputClient(TextInputClient* client) { 88 void InputMethodTSF::SetFocusedTextInputClient(TextInputClient* client) {
89 if (IsWindowFocused(client)) { 89 if (IsWindowFocused(client)) {
90 ui::TSFBridge::GetInstance()->SetFocusedClient( 90 ui::TSFBridge::GetInstance()->SetFocusedClient(
91 GetAttachedWindowHandle(client), client); 91 GetAttachedWindowHandle(client), client);
92 } 92 }
93 InputMethodWin::SetFocusedTextInputClient(client); 93 InputMethodWin::SetFocusedTextInputClient(client);
94 } 94 }
95 95
96 bool InputMethodTSF::IsCandidatePopupOpen() const {
97 // TODO(yukishiino): Implement this method.
98 return false;
99 }
100
96 void InputMethodTSF::OnWillChangeFocusedClient(TextInputClient* focused_before, 101 void InputMethodTSF::OnWillChangeFocusedClient(TextInputClient* focused_before,
97 TextInputClient* focused) { 102 TextInputClient* focused) {
98 if (IsWindowFocused(focused_before)) { 103 if (IsWindowFocused(focused_before)) {
99 ConfirmCompositionText(); 104 ConfirmCompositionText();
100 ui::TSFBridge::GetInstance()->RemoveFocusedClient(focused_before); 105 ui::TSFBridge::GetInstance()->RemoveFocusedClient(focused_before);
101 } 106 }
102 } 107 }
103 108
104 void InputMethodTSF::OnDidChangeFocusedClient(TextInputClient* focused_before, 109 void InputMethodTSF::OnDidChangeFocusedClient(TextInputClient* focused_before,
105 TextInputClient* focused) { 110 TextInputClient* focused) {
(...skipping 21 matching lines...) Expand all
127 } 132 }
128 133
129 bool InputMethodTSF::IsWindowFocused(const TextInputClient* client) const { 134 bool InputMethodTSF::IsWindowFocused(const TextInputClient* client) const {
130 if (!client) 135 if (!client)
131 return false; 136 return false;
132 HWND attached_window_handle = GetAttachedWindowHandle(client); 137 HWND attached_window_handle = GetAttachedWindowHandle(client);
133 return attached_window_handle && GetFocus() == attached_window_handle; 138 return attached_window_handle && GetFocus() == attached_window_handle;
134 } 139 }
135 140
136 } // namespace ui 141 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_tsf.h ('k') | ui/base/ime/mock_input_method.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698