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

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

Issue 80583002: [FYI] All-in-one OnCandidateWindow{Show,Update,Hide} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
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_imm32.h" 5 #include "ui/base/ime/input_method_imm32.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "ui/base/ime/composition_text.h" 8 #include "ui/base/ime/composition_text.h"
9 #include "ui/base/ime/text_input_client.h" 9 #include "ui/base/ime/text_input_client.h"
10 #include "ui/base/ime/win/tsf_input_scope.h" 10 #include "ui/base/ime/win/tsf_input_scope.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 LRESULT InputMethodIMM32::OnImeNotify(UINT message, 231 LRESULT InputMethodIMM32::OnImeNotify(UINT message,
232 WPARAM wparam, 232 WPARAM wparam,
233 LPARAM lparam, 233 LPARAM lparam,
234 BOOL* handled) { 234 BOOL* handled) {
235 *handled = FALSE; 235 *handled = FALSE;
236 236
237 // Update |is_candidate_popup_open_|, whether a candidate window is open. 237 // Update |is_candidate_popup_open_|, whether a candidate window is open.
238 switch (wparam) { 238 switch (wparam) {
239 case IMN_OPENCANDIDATE: 239 case IMN_OPENCANDIDATE:
240 is_candidate_popup_open_ = true; 240 is_candidate_popup_open_ = true;
241 NotifyCandidateWindowStateChanged();
yukawa 2013/11/25 05:07:42 I'm not sure if we can safely call back external c
241 break; 242 break;
242 case IMN_CLOSECANDIDATE: 243 case IMN_CLOSECANDIDATE:
243 is_candidate_popup_open_ = false; 244 is_candidate_popup_open_ = false;
245 NotifyCandidateWindowStateChanged();
246 break;
247 case IMN_CHANGECANDIDATE:
248 // TODO(kochi): The IME API expects this event to notify window size change,
249 // while this may fire more often without window resize. There is no generic
yukawa 2013/11/25 05:07:42 "There is no generic way to get bounds of candidat
250 // way to get bounds of candidate window.
251 NotifyCandidateWindowStateChanged();
244 break; 252 break;
245 } 253 }
246 254
247 return 0; 255 return 0;
248 } 256 }
249 257
250 void InputMethodIMM32::ConfirmCompositionText() { 258 void InputMethodIMM32::ConfirmCompositionText() {
251 if (composing_window_handle_) 259 if (composing_window_handle_)
252 imm32_manager_.CleanupComposition(composing_window_handle_); 260 imm32_manager_.CleanupComposition(composing_window_handle_);
253 261
(...skipping 23 matching lines...) Expand all
277 enabled_ = true; 285 enabled_ = true;
278 break; 286 break;
279 } 287 }
280 288
281 imm32_manager_.SetTextInputMode(window_handle, text_input_mode); 289 imm32_manager_.SetTextInputMode(window_handle, text_input_mode);
282 tsf_inputscope::SetInputScopeForTsfUnawareWindow( 290 tsf_inputscope::SetInputScopeForTsfUnawareWindow(
283 window_handle, text_input_type, text_input_mode); 291 window_handle, text_input_type, text_input_mode);
284 } 292 }
285 293
286 } // namespace ui 294 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698