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

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

Issue 1163603004: Remove candidate show/hide/update related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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_base_unittest.cc ('k') | ui/base/ime/remote_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_win.h" 5 #include "ui/base/ime/input_method_win.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 LRESULT InputMethodWin::OnImeNotify(UINT message, 359 LRESULT InputMethodWin::OnImeNotify(UINT message,
360 WPARAM wparam, 360 WPARAM wparam,
361 LPARAM lparam, 361 LPARAM lparam,
362 BOOL* handled) { 362 BOOL* handled) {
363 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. 363 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
364 tracked_objects::ScopedTracker tracking_profile( 364 tracked_objects::ScopedTracker tracking_profile(
365 FROM_HERE_WITH_EXPLICIT_FUNCTION("440919 InputMethodWin::OnImeNotify")); 365 FROM_HERE_WITH_EXPLICIT_FUNCTION("440919 InputMethodWin::OnImeNotify"));
366 366
367 *handled = FALSE; 367 *handled = FALSE;
368 368
369 bool previous_state = is_candidate_popup_open_;
370
371 // Update |is_candidate_popup_open_|, whether a candidate window is open. 369 // Update |is_candidate_popup_open_|, whether a candidate window is open.
372 switch (wparam) { 370 switch (wparam) {
373 case IMN_OPENCANDIDATE: 371 case IMN_OPENCANDIDATE:
374 is_candidate_popup_open_ = true; 372 is_candidate_popup_open_ = true;
375 if (!previous_state)
376 OnCandidateWindowShown();
377 break; 373 break;
378 case IMN_CLOSECANDIDATE: 374 case IMN_CLOSECANDIDATE:
379 is_candidate_popup_open_ = false; 375 is_candidate_popup_open_ = false;
380 if (previous_state)
381 OnCandidateWindowHidden();
382 break;
383 case IMN_CHANGECANDIDATE:
384 // TODO(kochi): The IME API expects this event to notify window size change,
385 // while this may fire more often without window resize. There is no generic
386 // way to get bounds of candidate window.
387 OnCandidateWindowUpdated();
388 break; 376 break;
389 } 377 }
390 378
391 return 0; 379 return 0;
392 } 380 }
393 381
394 LRESULT InputMethodWin::OnImeRequest(UINT message, 382 LRESULT InputMethodWin::OnImeRequest(UINT message,
395 WPARAM wparam, 383 WPARAM wparam,
396 LPARAM lparam, 384 LPARAM lparam,
397 BOOL* handled) { 385 BOOL* handled) {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 enabled_ = true; 617 enabled_ = true;
630 break; 618 break;
631 } 619 }
632 620
633 imm32_manager_.SetTextInputMode(window_handle, text_input_mode); 621 imm32_manager_.SetTextInputMode(window_handle, text_input_mode);
634 tsf_inputscope::SetInputScopeForTsfUnawareWindow( 622 tsf_inputscope::SetInputScopeForTsfUnawareWindow(
635 window_handle, text_input_type, text_input_mode); 623 window_handle, text_input_type, text_input_mode);
636 } 624 }
637 625
638 } // namespace ui 626 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_base_unittest.cc ('k') | ui/base/ime/remote_input_method_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698