Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: views/controls/textfield/native_textfield_views.cc

Issue 6004010: Implement clipboard features in views textfield. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Modified according to comments Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: views/controls/textfield/native_textfield_views.cc
diff --git a/views/controls/textfield/native_textfield_views.cc b/views/controls/textfield/native_textfield_views.cc
index b7c01f81c9abe4f86348799546cde8ee7ec7941e..44d42ad45a0f57cac33443f52e206173d797f218 100644
--- a/views/controls/textfield/native_textfield_views.cc
+++ b/views/controls/textfield/native_textfield_views.cc
@@ -426,6 +426,21 @@ bool NativeTextfieldViews::HandleKeyEvent(const KeyEvent& key_event) {
cursor_changed = true;
}
break;
+ case app::VKEY_X:
+ if (control) {
+ text_changed = model_->Cut();
+ }
oshima 2011/01/05 18:50:30 no need for {} for single line.
varunjain 2011/01/05 19:03:35 Done.
+ break;
+ case app::VKEY_C:
+ if (control) {
+ model_->Copy();
+ }
+ break;
+ case app::VKEY_V:
+ if (control) {
+ text_changed = model_->Paste();
+ }
+ break;
case app::VKEY_RIGHT:
control ? model_->MoveCursorToNextWord(selection)
: model_->MoveCursorRight(selection);

Powered by Google App Engine
This is Rietveld 408576698