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

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

Issue 23710009: Revert 219673 "Fix Views Combobox and Tree View text input." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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
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 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 if (index != -1) { 1513 if (index != -1) {
1512 obscured_reveal_timer_.Start( 1514 obscured_reveal_timer_.Start(
1513 FROM_HERE, 1515 FROM_HERE,
1514 duration, 1516 duration,
1515 base::Bind(&NativeTextfieldViews::RevealObscuredChar, 1517 base::Bind(&NativeTextfieldViews::RevealObscuredChar,
1516 base::Unretained(this), -1, base::TimeDelta())); 1518 base::Unretained(this), -1, base::TimeDelta()));
1517 } 1519 }
1518 } 1520 }
1519 1521
1520 } // namespace views 1522 } // namespace views
OLDNEW
« no previous file with comments | « trunk/src/ui/views/controls/combobox/native_combobox_views_unittest.cc ('k') | trunk/src/ui/views/controls/tree/tree_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698