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

Unified 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: update Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/ime/input_method_base_unittest.cc ('k') | ui/base/ime/input_method_tsf.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_imm32.cc
diff --git a/ui/base/ime/input_method_imm32.cc b/ui/base/ime/input_method_imm32.cc
index 8ee5c5c0e94f6f8901372517b4724b51f7823cbd..16a33a1128cf4448fe8539ae0722651527b2c5b9 100644
--- a/ui/base/ime/input_method_imm32.cc
+++ b/ui/base/ime/input_method_imm32.cc
@@ -235,13 +235,25 @@ LRESULT InputMethodIMM32::OnImeNotify(UINT message,
BOOL* handled) {
*handled = FALSE;
+ bool previous_state = is_candidate_popup_open_;
+
// Update |is_candidate_popup_open_|, whether a candidate window is open.
switch (wparam) {
case IMN_OPENCANDIDATE:
is_candidate_popup_open_ = true;
+ if (!previous_state)
+ OnCandidateWindowShown();
break;
case IMN_CLOSECANDIDATE:
is_candidate_popup_open_ = false;
+ if (previous_state)
+ OnCandidateWindowHidden();
+ break;
+ case IMN_CHANGECANDIDATE:
+ // TODO(kochi): The IME API expects this event to notify window size change,
+ // while this may fire more often without window resize. There is no generic
+ // way to get bounds of candidate window.
+ OnCandidateWindowUpdated();
break;
}
« no previous file with comments | « ui/base/ime/input_method_base_unittest.cc ('k') | ui/base/ime/input_method_tsf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698