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

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

Issue 1091703002: Eliminate faux-RTTI code from BrowserView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to patch set 2 Created 5 years, 8 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 | « ui/views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 6eea993064381734d19a2b21ebaa8b595b931907..73cccd53caee69362e41da731ea84207ccd45fc4 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -809,6 +809,14 @@ void Textfield::OnGestureEvent(ui::GestureEvent* event) {
}
}
+// This function is called by BrowserView to execute clipboard commands.
+bool Textfield::AcceleratorPressed(const ui::Accelerator& accelerator) {
+ ui::KeyEvent event(accelerator.type(), accelerator.key_code(),
+ accelerator.modifiers());
+ ExecuteCommand(GetCommandForKeyEvent(event, HasSelection()));
+ return true;
+}
+
void Textfield::AboutToRequestFocusFromTabTraversal(bool reverse) {
SelectAll(false);
}
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698