| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 // Textfield, SelectionController::Delegate overrides: | 1725 // Textfield, SelectionController::Delegate overrides: |
| 1726 | 1726 |
| 1727 gfx::RenderText* Textfield::GetRenderTextForSelection() { | 1727 gfx::RenderText* Textfield::GetRenderTextForSelection() { |
| 1728 return GetRenderText(); | 1728 return GetRenderText(); |
| 1729 } | 1729 } |
| 1730 | 1730 |
| 1731 bool Textfield::IsReadOnly() const { | 1731 bool Textfield::IsReadOnly() const { |
| 1732 return false; | 1732 return false; |
| 1733 } | 1733 } |
| 1734 | 1734 |
| 1735 bool Textfield::SupportsDrag() const { |
| 1736 return true; |
| 1737 } |
| 1738 |
| 1735 void Textfield::SetTextBeingDragged(bool value) { | 1739 void Textfield::SetTextBeingDragged(bool value) { |
| 1736 initiating_drag_ = value; | 1740 initiating_drag_ = value; |
| 1737 } | 1741 } |
| 1738 | 1742 |
| 1739 int Textfield::GetViewHeight() const { | 1743 int Textfield::GetViewHeight() const { |
| 1740 return height(); | 1744 return height(); |
| 1741 } | 1745 } |
| 1742 | 1746 |
| 1743 int Textfield::GetViewWidth() const { | 1747 int Textfield::GetViewWidth() const { |
| 1744 return width(); | 1748 return width(); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2024 } | 2028 } |
| 2025 | 2029 |
| 2026 void Textfield::OnCursorBlinkTimerFired() { | 2030 void Textfield::OnCursorBlinkTimerFired() { |
| 2027 DCHECK(ShouldBlinkCursor()); | 2031 DCHECK(ShouldBlinkCursor()); |
| 2028 gfx::RenderText* render_text = GetRenderText(); | 2032 gfx::RenderText* render_text = GetRenderText(); |
| 2029 render_text->set_cursor_visible(!render_text->cursor_visible()); | 2033 render_text->set_cursor_visible(!render_text->cursor_visible()); |
| 2030 RepaintCursor(); | 2034 RepaintCursor(); |
| 2031 } | 2035 } |
| 2032 | 2036 |
| 2033 } // namespace views | 2037 } // namespace views |
| OLD | NEW |