| 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 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1492 } | 1492 } |
| 1493 | 1493 |
| 1494 void Textfield::EnsureCaretInRect(const gfx::Rect& rect) {} | 1494 void Textfield::EnsureCaretInRect(const gfx::Rect& rect) {} |
| 1495 | 1495 |
| 1496 void Textfield::OnCandidateWindowShown() {} | 1496 void Textfield::OnCandidateWindowShown() {} |
| 1497 | 1497 |
| 1498 void Textfield::OnCandidateWindowUpdated() {} | 1498 void Textfield::OnCandidateWindowUpdated() {} |
| 1499 | 1499 |
| 1500 void Textfield::OnCandidateWindowHidden() {} | 1500 void Textfield::OnCandidateWindowHidden() {} |
| 1501 | 1501 |
| 1502 bool Textfield::IsEditingCommandEnabled(int command_id) { |
| 1503 return IsCommandIdEnabled(command_id); |
| 1504 } |
| 1505 |
| 1506 void Textfield::ExecuteEditingCommand(int command_id) { |
| 1507 ExecuteCommand(command_id); |
| 1508 } |
| 1509 |
| 1502 //////////////////////////////////////////////////////////////////////////////// | 1510 //////////////////////////////////////////////////////////////////////////////// |
| 1503 // Textfield, protected: | 1511 // Textfield, protected: |
| 1504 | 1512 |
| 1505 gfx::RenderText* Textfield::GetRenderText() const { | 1513 gfx::RenderText* Textfield::GetRenderText() const { |
| 1506 return model_->render_text(); | 1514 return model_->render_text(); |
| 1507 } | 1515 } |
| 1508 | 1516 |
| 1509 base::string16 Textfield::GetSelectionClipboardText() const { | 1517 base::string16 Textfield::GetSelectionClipboardText() const { |
| 1510 base::string16 selection_clipboard_text; | 1518 base::string16 selection_clipboard_text; |
| 1511 ui::Clipboard::GetForCurrentThread()->ReadText( | 1519 ui::Clipboard::GetForCurrentThread()->ReadText( |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1752 const size_t length = selection_clipboard_text.length(); | 1760 const size_t length = selection_clipboard_text.length(); |
| 1753 range = gfx::Range(range.start() + length, range.end() + length); | 1761 range = gfx::Range(range.start() + length, range.end() + length); |
| 1754 } | 1762 } |
| 1755 model_->MoveCursorTo(gfx::SelectionModel(range, affinity)); | 1763 model_->MoveCursorTo(gfx::SelectionModel(range, affinity)); |
| 1756 UpdateAfterChange(true, true); | 1764 UpdateAfterChange(true, true); |
| 1757 OnAfterUserAction(); | 1765 OnAfterUserAction(); |
| 1758 } | 1766 } |
| 1759 } | 1767 } |
| 1760 | 1768 |
| 1761 } // namespace views | 1769 } // namespace views |
| OLD | NEW |