| 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/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "ui/accessibility/ax_view_state.h" | 10 #include "ui/accessibility/ax_view_state.h" |
| (...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1608 | 1608 |
| 1609 range.set_start(range.start() - before); | 1609 range.set_start(range.start() - before); |
| 1610 range.set_end(range.end() + after); | 1610 range.set_end(range.end() + after); |
| 1611 gfx::Range text_range; | 1611 gfx::Range text_range; |
| 1612 if (GetTextRange(&text_range) && text_range.Contains(range)) | 1612 if (GetTextRange(&text_range) && text_range.Contains(range)) |
| 1613 DeleteRange(range); | 1613 DeleteRange(range); |
| 1614 } | 1614 } |
| 1615 | 1615 |
| 1616 void Textfield::EnsureCaretInRect(const gfx::Rect& rect) {} | 1616 void Textfield::EnsureCaretInRect(const gfx::Rect& rect) {} |
| 1617 | 1617 |
| 1618 void Textfield::OnCandidateWindowShown() {} | |
| 1619 | |
| 1620 void Textfield::OnCandidateWindowUpdated() {} | |
| 1621 | |
| 1622 void Textfield::OnCandidateWindowHidden() {} | |
| 1623 | |
| 1624 bool Textfield::IsEditCommandEnabled(int command_id) { | 1618 bool Textfield::IsEditCommandEnabled(int command_id) { |
| 1625 return IsCommandIdEnabled(command_id); | 1619 return IsCommandIdEnabled(command_id); |
| 1626 } | 1620 } |
| 1627 | 1621 |
| 1628 void Textfield::SetEditCommandForNextKeyEvent(int command_id) { | 1622 void Textfield::SetEditCommandForNextKeyEvent(int command_id) { |
| 1629 DCHECK_EQ(kNoCommand, scheduled_edit_command_); | 1623 DCHECK_EQ(kNoCommand, scheduled_edit_command_); |
| 1630 scheduled_edit_command_ = command_id; | 1624 scheduled_edit_command_ = command_id; |
| 1631 } | 1625 } |
| 1632 | 1626 |
| 1633 //////////////////////////////////////////////////////////////////////////////// | 1627 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 RequestFocus(); | 1892 RequestFocus(); |
| 1899 model_->MoveCursorTo(mouse); | 1893 model_->MoveCursorTo(mouse); |
| 1900 if (!selection_clipboard_text.empty()) { | 1894 if (!selection_clipboard_text.empty()) { |
| 1901 model_->InsertText(selection_clipboard_text); | 1895 model_->InsertText(selection_clipboard_text); |
| 1902 UpdateAfterChange(true, true); | 1896 UpdateAfterChange(true, true); |
| 1903 } | 1897 } |
| 1904 OnAfterUserAction(); | 1898 OnAfterUserAction(); |
| 1905 } | 1899 } |
| 1906 | 1900 |
| 1907 } // namespace views | 1901 } // namespace views |
| OLD | NEW |