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

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: 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..648999481ad27b834cecf1f36dd83bd95d671a65 100644
--- a/views/controls/textfield/native_textfield_views.cc
+++ b/views/controls/textfield/native_textfield_views.cc
@@ -466,6 +466,10 @@ bool NativeTextfieldViews::HandleKeyEvent(const KeyEvent& key_event) {
model_->Replace(print_char);
text_changed = true;
}
+ if (control && (key_code == app::VKEY_X || key_code == app::VKEY_C ||
+ key_code == app::VKEY_V)) {
+ text_changed = model_->HandleClipboardEvents(key_code);
oshima 2011/01/04 22:36:49 I think it's more consistent to have Cut&Copy&Past
varunjain 2011/01/05 16:19:31 Done.
+ }
if (text_changed) {
textfield_->SyncText();
Textfield::Controller* controller = textfield_->GetController();

Powered by Google App Engine
This is Rietveld 408576698