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

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: code style fixes Created 9 years, 11 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
« no previous file with comments | « views/controls/textfield/native_textfield_views.h ('k') | views/controls/textfield/textfield_views_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2a42c5a82749c8a4951972348acddf0ffb962f08..923de0c4e4265f75952dec8a7b711523a374eec9 100644
--- a/views/controls/textfield/native_textfield_views.cc
+++ b/views/controls/textfield/native_textfield_views.cc
@@ -445,6 +445,18 @@ bool NativeTextfieldViews::HandleKeyEvent(const KeyEvent& key_event) {
cursor_changed = true;
}
break;
+ case app::VKEY_X:
+ if (control)
+ text_changed = model_->Cut();
+ 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);
« no previous file with comments | « views/controls/textfield/native_textfield_views.h ('k') | views/controls/textfield/textfield_views_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698