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

Side by Side Diff: ui/views/controls/textfield/native_textfield_views.cc

Issue 21751002: Fix IME on bookmark edit dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Call InputMethod::OnBlur() in HandleBlur() Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 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/views/controls/textfield/native_textfield_views.h" 5 #include "ui/views/controls/textfield/native_textfield_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 } 673 }
674 674
675 bool NativeTextfieldViews::HandleKeyReleased(const ui::KeyEvent& e) { 675 bool NativeTextfieldViews::HandleKeyReleased(const ui::KeyEvent& e) {
676 return false; // crbug.com/127520 676 return false; // crbug.com/127520
677 } 677 }
678 678
679 void NativeTextfieldViews::HandleFocus() { 679 void NativeTextfieldViews::HandleFocus() {
680 GetRenderText()->set_focused(true); 680 GetRenderText()->set_focused(true);
681 is_cursor_visible_ = true; 681 is_cursor_visible_ = true;
682 SchedulePaint(); 682 SchedulePaint();
683 GetInputMethod()->OnFocus();
683 OnCaretBoundsChanged(); 684 OnCaretBoundsChanged();
684 // Start blinking cursor. 685 // Start blinking cursor.
685 base::MessageLoop::current()->PostDelayedTask( 686 base::MessageLoop::current()->PostDelayedTask(
686 FROM_HERE, 687 FROM_HERE,
687 base::Bind(&NativeTextfieldViews::UpdateCursor, 688 base::Bind(&NativeTextfieldViews::UpdateCursor,
688 cursor_timer_.GetWeakPtr()), 689 cursor_timer_.GetWeakPtr()),
689 base::TimeDelta::FromMilliseconds(kCursorBlinkCycleMs / 2)); 690 base::TimeDelta::FromMilliseconds(kCursorBlinkCycleMs / 2));
690 } 691 }
691 692
692 void NativeTextfieldViews::HandleBlur() { 693 void NativeTextfieldViews::HandleBlur() {
693 GetRenderText()->set_focused(false); 694 GetRenderText()->set_focused(false);
695 GetInputMethod()->OnBlur();
694 // Stop blinking cursor. 696 // Stop blinking cursor.
695 cursor_timer_.InvalidateWeakPtrs(); 697 cursor_timer_.InvalidateWeakPtrs();
696 if (is_cursor_visible_) { 698 if (is_cursor_visible_) {
697 is_cursor_visible_ = false; 699 is_cursor_visible_ = false;
698 RepaintCursor(); 700 RepaintCursor();
699 } 701 }
700 702
701 touch_selection_controller_.reset(); 703 touch_selection_controller_.reset();
702 704
703 ClearSelection(); 705 ClearSelection();
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 if (index != -1) { 1500 if (index != -1) {
1499 obscured_reveal_timer_.Start( 1501 obscured_reveal_timer_.Start(
1500 FROM_HERE, 1502 FROM_HERE,
1501 duration, 1503 duration,
1502 base::Bind(&NativeTextfieldViews::RevealObscuredChar, 1504 base::Bind(&NativeTextfieldViews::RevealObscuredChar,
1503 base::Unretained(this), -1, base::TimeDelta())); 1505 base::Unretained(this), -1, base::TimeDelta()));
1504 } 1506 }
1505 } 1507 }
1506 1508
1507 } // namespace views 1509 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698