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

Side by Side Diff: ui/base/ime/input_method_base.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.h ('k') | ui/base/ime/input_method_base_unittest.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_base.h" 5 #include "ui/base/ime/input_method_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "ui/base/ime/input_method_delegate.h" 10 #include "ui/base/ime/input_method_delegate.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 TextInputClient* old = text_input_client_; 138 TextInputClient* old = text_input_client_;
139 if (old == client) 139 if (old == client)
140 return; 140 return;
141 OnWillChangeFocusedClient(old, client); 141 OnWillChangeFocusedClient(old, client);
142 text_input_client_ = client; // NULL allowed. 142 text_input_client_ = client; // NULL allowed.
143 OnDidChangeFocusedClient(old, client); 143 OnDidChangeFocusedClient(old, client);
144 NotifyTextInputStateChanged(text_input_client_); 144 NotifyTextInputStateChanged(text_input_client_);
145 } 145 }
146 146
147 void InputMethodBase::OnCandidateWindowShown() {
148 base::MessageLoop::current()->PostTask(
149 FROM_HERE,
150 base::Bind(&InputMethodBase::CandidateWindowShownCallback, AsWeakPtr()));
151 }
152
153 void InputMethodBase::OnCandidateWindowUpdated() {
154 base::MessageLoop::current()->PostTask(
155 FROM_HERE,
156 base::Bind(&InputMethodBase::CandidateWindowUpdatedCallback,
157 AsWeakPtr()));
158 }
159
160 void InputMethodBase::OnCandidateWindowHidden() {
161 base::MessageLoop::current()->PostTask(
162 FROM_HERE,
163 base::Bind(&InputMethodBase::CandidateWindowHiddenCallback, AsWeakPtr()));
164 }
165
166 void InputMethodBase::CandidateWindowShownCallback() {
167 if (TextInputClient* text_input_client = GetTextInputClient())
168 text_input_client->OnCandidateWindowShown();
169 }
170
171 void InputMethodBase::CandidateWindowUpdatedCallback() {
172 if (TextInputClient* text_input_client = GetTextInputClient())
173 text_input_client->OnCandidateWindowUpdated();
174 }
175
176 void InputMethodBase::CandidateWindowHiddenCallback() {
177 if (TextInputClient* text_input_client = GetTextInputClient())
178 text_input_client->OnCandidateWindowHidden();
179 }
180
181 } // namespace ui 147 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/input_method_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698