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

Side by Side Diff: ui/views/ime/input_method_bridge.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/ime/win/tsf_bridge.cc ('k') | no next file » | 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/views/ime/input_method_bridge.h" 5 #include "ui/views/ime/input_method_bridge.h"
6 6
7 #include "ui/base/ime/input_method.h" 7 #include "ui/base/ime/input_method.h"
8 #include "ui/base/ime/input_method_observer.h" 8 #include "ui/base/ime/input_method_observer.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 client->ExtendSelectionAndDelete(before, after); 302 client->ExtendSelectionAndDelete(before, after);
303 } 303 }
304 304
305 void InputMethodBridge::EnsureCaretInRect(const gfx::Rect& rect) { 305 void InputMethodBridge::EnsureCaretInRect(const gfx::Rect& rect) {
306 TextInputClient* client = GetTextInputClient(); 306 TextInputClient* client = GetTextInputClient();
307 if (client) 307 if (client)
308 client->EnsureCaretInRect(rect); 308 client->EnsureCaretInRect(rect);
309 } 309 }
310 310
311 void InputMethodBridge::OnCandidateWindowShown() { 311 void InputMethodBridge::OnCandidateWindowShown() {
312 TextInputClient* client = GetTextInputClient();
313 if (client)
314 client->OnCandidateWindowShown();
312 } 315 }
313 316
314 void InputMethodBridge::OnCandidateWindowUpdated() { 317 void InputMethodBridge::OnCandidateWindowUpdated() {
318 TextInputClient* client = GetTextInputClient();
319 if (client)
320 client->OnCandidateWindowUpdated();
315 } 321 }
316 322
317 void InputMethodBridge::OnCandidateWindowHidden() { 323 void InputMethodBridge::OnCandidateWindowHidden() {
324 TextInputClient* client = GetTextInputClient();
325 if (client)
326 client->OnCandidateWindowHidden();
318 } 327 }
319 328
320 // Overridden from FocusChangeListener. 329 // Overridden from FocusChangeListener.
321 void InputMethodBridge::OnWillChangeFocus(View* focused_before, View* focused) { 330 void InputMethodBridge::OnWillChangeFocus(View* focused_before, View* focused) {
322 if (HasCompositionText()) { 331 if (HasCompositionText()) {
323 ConfirmCompositionText(); 332 ConfirmCompositionText();
324 CancelComposition(focused_before); 333 CancelComposition(focused_before);
325 } 334 }
326 } 335 }
327 336
328 void InputMethodBridge::OnDidChangeFocus(View* focused_before, View* focused) { 337 void InputMethodBridge::OnDidChangeFocus(View* focused_before, View* focused) {
329 DCHECK_EQ(GetFocusedView(), focused); 338 DCHECK_EQ(GetFocusedView(), focused);
330 OnTextInputTypeChanged(focused); 339 OnTextInputTypeChanged(focused);
331 OnCaretBoundsChanged(focused); 340 OnCaretBoundsChanged(focused);
332 } 341 }
333 342
334 ui::InputMethod* InputMethodBridge::GetHostInputMethod() const { 343 ui::InputMethod* InputMethodBridge::GetHostInputMethod() const {
335 return host_; 344 return host_;
336 } 345 }
337 346
338 347
339 } // namespace views 348 } // namespace views
OLDNEW
« no previous file with comments | « ui/base/ime/win/tsf_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698