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

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

Issue 10968049: Disable right button drag in omnibox (Closed) Base URL: http://git.chromium.org/chromium/src.git@new
Patch Set: Disable right button dragging in Textfield" Created 8 years, 3 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 5ea98f4e55753894a27819e74975ebbf3e13ebfd..25fc4c7326435deb1ec53716e0ccf2c7dc029c31 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -407,6 +407,12 @@ bool Textfield::OnKeyReleased(const ui::KeyEvent& e) {
return native_wrapper_ && native_wrapper_->HandleKeyReleased(e);
}
+bool Textfield::OnMouseDragged(const ui::MouseEvent& e) {
+ if (!e.IsOnlyRightMouseButton())
+ return View::OnMouseDragged(e);
+ return true;
+}
+
void Textfield::OnFocus() {
if (native_wrapper_)
native_wrapper_->HandleFocus();
« 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