| OLD | NEW |
| 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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 | 709 |
| 710 void NativeTextfieldViews::ClearEditHistory() { | 710 void NativeTextfieldViews::ClearEditHistory() { |
| 711 model_->ClearEditHistory(); | 711 model_->ClearEditHistory(); |
| 712 } | 712 } |
| 713 | 713 |
| 714 int NativeTextfieldViews::GetFontHeight() { | 714 int NativeTextfieldViews::GetFontHeight() { |
| 715 return GetRenderText()->font_list().GetHeight(); | 715 return GetRenderText()->font_list().GetHeight(); |
| 716 } | 716 } |
| 717 | 717 |
| 718 int NativeTextfieldViews::GetTextfieldBaseline() const { | 718 int NativeTextfieldViews::GetTextfieldBaseline() const { |
| 719 return GetRenderText()->font_list().GetBaseline(); | 719 return GetRenderText()->GetBaseline(); |
| 720 } | 720 } |
| 721 | 721 |
| 722 int NativeTextfieldViews::GetWidthNeededForText() const { | 722 int NativeTextfieldViews::GetWidthNeededForText() const { |
| 723 return GetRenderText()->GetContentWidth() + GetInsets().width(); | 723 return GetRenderText()->GetContentWidth() + GetInsets().width(); |
| 724 } | 724 } |
| 725 | 725 |
| 726 void NativeTextfieldViews::ExecuteTextCommand(int command_id) { | 726 void NativeTextfieldViews::ExecuteTextCommand(int command_id) { |
| 727 ExecuteCommand(command_id, 0); | 727 ExecuteCommand(command_id, 0); |
| 728 } | 728 } |
| 729 | 729 |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 if (index != -1) { | 1494 if (index != -1) { |
| 1495 obscured_reveal_timer_.Start( | 1495 obscured_reveal_timer_.Start( |
| 1496 FROM_HERE, | 1496 FROM_HERE, |
| 1497 duration, | 1497 duration, |
| 1498 base::Bind(&NativeTextfieldViews::RevealObscuredChar, | 1498 base::Bind(&NativeTextfieldViews::RevealObscuredChar, |
| 1499 base::Unretained(this), -1, base::TimeDelta())); | 1499 base::Unretained(this), -1, base::TimeDelta())); |
| 1500 } | 1500 } |
| 1501 } | 1501 } |
| 1502 | 1502 |
| 1503 } // namespace views | 1503 } // namespace views |
| OLD | NEW |