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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.h

Issue 10386173: ash: Select omnibox text on mouse up instead of down. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge and add test todo Created 8 years, 7 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: chrome/browser/ui/views/omnibox/omnibox_view_views.h
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
index 9c4b4320cf446d7b74d36cce70b5f126f23bc5aa..beb8d17124ff5ac50243bb1c468890a37bd41bf2 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
@@ -71,8 +71,11 @@ class OmniboxViewViews
// Called when KeyRelease event is generated on textfield.
bool HandleKeyReleaseEvent(const views::KeyEvent& event);
- // Called when the mouse press event is generated on textfield.
- bool HandleMousePressEvent(const views::MouseEvent& event);
+ // Called when mouse events are generated on the textfield.
+ // The views::Textfield implementations will be executed first.
+ void HandleMousePressEvent(const views::MouseEvent& event);
+ void HandleMouseDragEvent(const views::MouseEvent& event);
+ void HandleMouseReleaseEvent(const views::MouseEvent& event);
// Called when Focus is set/unset on textfield.
void HandleFocusIn();
@@ -215,6 +218,12 @@ class OmniboxViewViews
// on Chrome OS.
bool ime_candidate_window_open_;
+ // Should we select all the text when we see the mouse button get released?
+ // We select in response to a click that focuses the omnibox, but we defer
+ // until release, setting this variable back to false if we saw a drag, to
+ // allow the user to select just a portion of the text.
+ bool select_all_on_mouse_release_;
+
DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews);
};
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view_browsertest.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698