| OLD | NEW |
| 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/controls/textfield/textfield.h" | 5 #include "ui/views/controls/textfield/textfield.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "grit/ui_strings.h" | 10 #include "grit/ui_strings.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 placeholder_text_color_(kDefaultPlaceholderTextColor), | 82 placeholder_text_color_(kDefaultPlaceholderTextColor), |
| 83 text_input_type_(ui::TEXT_INPUT_TYPE_TEXT), | 83 text_input_type_(ui::TEXT_INPUT_TYPE_TEXT), |
| 84 skip_input_method_cancel_composition_(false), | 84 skip_input_method_cancel_composition_(false), |
| 85 cursor_visible_(false), | 85 cursor_visible_(false), |
| 86 drop_cursor_visible_(false), | 86 drop_cursor_visible_(false), |
| 87 initiating_drag_(false), | 87 initiating_drag_(false), |
| 88 aggregated_clicks_(0), | 88 aggregated_clicks_(0), |
| 89 weak_ptr_factory_(this) { | 89 weak_ptr_factory_(this) { |
| 90 set_context_menu_controller(this); | 90 set_context_menu_controller(this); |
| 91 set_drag_controller(this); | 91 set_drag_controller(this); |
| 92 set_border(new FocusableBorder()); | 92 SetBorder(scoped_ptr<Border>(new FocusableBorder())); |
| 93 SetFocusable(true); | 93 SetFocusable(true); |
| 94 | 94 |
| 95 if (ViewsDelegate::views_delegate) { | 95 if (ViewsDelegate::views_delegate) { |
| 96 password_reveal_duration_ = ViewsDelegate::views_delegate-> | 96 password_reveal_duration_ = ViewsDelegate::views_delegate-> |
| 97 GetDefaultTextfieldObscuredRevealDuration(); | 97 GetDefaultTextfieldObscuredRevealDuration(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 if (NativeViewHost::kRenderNativeControlFocus) | 100 if (NativeViewHost::kRenderNativeControlFocus) |
| 101 focus_painter_ = Painter::CreateDashedFocusPainter(); | 101 focus_painter_ = Painter::CreateDashedFocusPainter(); |
| 102 } | 102 } |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1471 void Textfield::CreateTouchSelectionControllerAndNotifyIt() { | 1471 void Textfield::CreateTouchSelectionControllerAndNotifyIt() { |
| 1472 if (!touch_selection_controller_) { | 1472 if (!touch_selection_controller_) { |
| 1473 touch_selection_controller_.reset( | 1473 touch_selection_controller_.reset( |
| 1474 ui::TouchSelectionController::create(this)); | 1474 ui::TouchSelectionController::create(this)); |
| 1475 } | 1475 } |
| 1476 if (touch_selection_controller_) | 1476 if (touch_selection_controller_) |
| 1477 touch_selection_controller_->SelectionChanged(); | 1477 touch_selection_controller_->SelectionChanged(); |
| 1478 } | 1478 } |
| 1479 | 1479 |
| 1480 } // namespace views | 1480 } // namespace views |
| OLD | NEW |