| 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 "ui/accessibility/ax_view_state.h" | 10 #include "ui/accessibility/ax_view_state.h" |
| (...skipping 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1605 void Textfield::OnCandidateWindowHidden() {} | 1605 void Textfield::OnCandidateWindowHidden() {} |
| 1606 | 1606 |
| 1607 bool Textfield::IsEditingCommandEnabled(int command_id) { | 1607 bool Textfield::IsEditingCommandEnabled(int command_id) { |
| 1608 return IsCommandIdEnabled(command_id); | 1608 return IsCommandIdEnabled(command_id); |
| 1609 } | 1609 } |
| 1610 | 1610 |
| 1611 void Textfield::ExecuteEditingCommand(int command_id) { | 1611 void Textfield::ExecuteEditingCommand(int command_id) { |
| 1612 ExecuteCommand(command_id); | 1612 ExecuteCommand(command_id); |
| 1613 } | 1613 } |
| 1614 | 1614 |
| 1615 void Textfield::OnKeyboardBoundsUnchanged() {} |
| 1616 |
| 1615 //////////////////////////////////////////////////////////////////////////////// | 1617 //////////////////////////////////////////////////////////////////////////////// |
| 1616 // Textfield, protected: | 1618 // Textfield, protected: |
| 1617 | 1619 |
| 1618 gfx::RenderText* Textfield::GetRenderText() const { | 1620 gfx::RenderText* Textfield::GetRenderText() const { |
| 1619 return model_->render_text(); | 1621 return model_->render_text(); |
| 1620 } | 1622 } |
| 1621 | 1623 |
| 1622 base::string16 Textfield::GetSelectionClipboardText() const { | 1624 base::string16 Textfield::GetSelectionClipboardText() const { |
| 1623 base::string16 selection_clipboard_text; | 1625 base::string16 selection_clipboard_text; |
| 1624 ui::Clipboard::GetForCurrentThread()->ReadText( | 1626 ui::Clipboard::GetForCurrentThread()->ReadText( |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1869 const size_t length = selection_clipboard_text.length(); | 1871 const size_t length = selection_clipboard_text.length(); |
| 1870 range = gfx::Range(range.start() + length, range.end() + length); | 1872 range = gfx::Range(range.start() + length, range.end() + length); |
| 1871 } | 1873 } |
| 1872 model_->MoveCursorTo(gfx::SelectionModel(range, affinity)); | 1874 model_->MoveCursorTo(gfx::SelectionModel(range, affinity)); |
| 1873 UpdateAfterChange(true, true); | 1875 UpdateAfterChange(true, true); |
| 1874 OnAfterUserAction(); | 1876 OnAfterUserAction(); |
| 1875 } | 1877 } |
| 1876 } | 1878 } |
| 1877 | 1879 |
| 1878 } // namespace views | 1880 } // namespace views |
| OLD | NEW |