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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 NativeTextfieldViews::NativeTextfieldViews(Textfield* parent) | 77 NativeTextfieldViews::NativeTextfieldViews(Textfield* parent) |
78 : textfield_(parent), | 78 : textfield_(parent), |
79 model_(new TextfieldViewsModel(this)), | 79 model_(new TextfieldViewsModel(this)), |
80 text_border_(new FocusableBorder()), | 80 text_border_(new FocusableBorder()), |
81 is_cursor_visible_(false), | 81 is_cursor_visible_(false), |
82 is_drop_cursor_visible_(false), | 82 is_drop_cursor_visible_(false), |
83 skip_input_method_cancel_composition_(false), | 83 skip_input_method_cancel_composition_(false), |
84 initiating_drag_(false), | 84 initiating_drag_(false), |
85 cursor_timer_(this), | 85 cursor_timer_(this), |
86 aggregated_clicks_(0), | 86 aggregated_clicks_(0) { |
87 touch_selection_controller_(NULL) { | |
88 set_border(text_border_); | 87 set_border(text_border_); |
89 | 88 |
90 #if defined(OS_CHROMEOS) | 89 #if defined(OS_CHROMEOS) |
91 GetRenderText()->SetFontList(gfx::FontList(l10n_util::GetStringUTF8( | 90 GetRenderText()->SetFontList(gfx::FontList(l10n_util::GetStringUTF8( |
92 IDS_UI_FONT_FAMILY_CROS))); | 91 IDS_UI_FONT_FAMILY_CROS))); |
93 #else | 92 #else |
94 GetRenderText()->SetFont(textfield_->font()); | 93 GetRenderText()->SetFont(textfield_->font()); |
95 #endif | 94 #endif |
96 | 95 |
97 UpdateColorsFromTheme(GetNativeTheme()); | 96 UpdateColorsFromTheme(GetNativeTheme()); |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1506 if (index != -1) { | 1505 if (index != -1) { |
1507 obscured_reveal_timer_.Start( | 1506 obscured_reveal_timer_.Start( |
1508 FROM_HERE, | 1507 FROM_HERE, |
1509 duration, | 1508 duration, |
1510 base::Bind(&NativeTextfieldViews::RevealObscuredChar, | 1509 base::Bind(&NativeTextfieldViews::RevealObscuredChar, |
1511 base::Unretained(this), -1, base::TimeDelta())); | 1510 base::Unretained(this), -1, base::TimeDelta())); |
1512 } | 1511 } |
1513 } | 1512 } |
1514 | 1513 |
1515 } // namespace views | 1514 } // namespace views |
OLD | NEW |