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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.h

Issue 12090098: Tapping on omnibox should select all text. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // Called when KeyRelease event is generated on textfield. 68 // Called when KeyRelease event is generated on textfield.
69 bool HandleKeyReleaseEvent(const ui::KeyEvent& event); 69 bool HandleKeyReleaseEvent(const ui::KeyEvent& event);
70 70
71 // Called when mouse events are generated on the textfield. 71 // Called when mouse events are generated on the textfield.
72 // The views::Textfield implementations will be executed first. 72 // The views::Textfield implementations will be executed first.
73 void HandleMousePressEvent(const ui::MouseEvent& event); 73 void HandleMousePressEvent(const ui::MouseEvent& event);
74 void HandleMouseDragEvent(const ui::MouseEvent& event); 74 void HandleMouseDragEvent(const ui::MouseEvent& event);
75 void HandleMouseReleaseEvent(const ui::MouseEvent& event); 75 void HandleMouseReleaseEvent(const ui::MouseEvent& event);
76 76
77 // Called when a gesture event is generated on textfield.
78 void HandleGestureEvent(const ui::GestureEvent& event);
79
77 // Called when Focus is set/unset on textfield. 80 // Called when Focus is set/unset on textfield.
78 void HandleFocusIn(); 81 void HandleFocusIn();
79 void HandleFocusOut(); 82 void HandleFocusOut();
80 83
81 // Sets whether the location entry can accept focus. 84 // Sets whether the location entry can accept focus.
82 void SetLocationEntryFocusable(bool focusable); 85 void SetLocationEntryFocusable(bool focusable);
83 86
84 // Returns true if the location entry is focusable and visible in 87 // Returns true if the location entry is focusable and visible in
85 // the root view. 88 // the root view.
86 bool IsLocationEntryFocusableInRootView() const; 89 bool IsLocationEntryFocusableInRootView() const;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // avoid showing the popup. So far, the candidate window is detected only 215 // avoid showing the popup. So far, the candidate window is detected only
213 // on Chrome OS. 216 // on Chrome OS.
214 bool ime_candidate_window_open_; 217 bool ime_candidate_window_open_;
215 218
216 // Should we select all the text when we see the mouse button get released? 219 // Should we select all the text when we see the mouse button get released?
217 // We select in response to a click that focuses the omnibox, but we defer 220 // We select in response to a click that focuses the omnibox, but we defer
218 // until release, setting this variable back to false if we saw a drag, to 221 // until release, setting this variable back to false if we saw a drag, to
219 // allow the user to select just a portion of the text. 222 // allow the user to select just a portion of the text.
220 bool select_all_on_mouse_release_; 223 bool select_all_on_mouse_release_;
221 224
225 // Indicates if we want to select all text in the omnibox when we get a
226 // GESTURE_TAP. We want to select all only when the textfield is not in focus
227 // and gets a tap. So we use this variable to remember focus state before tap.
228 bool select_all_on_gesture_tap_;
229
222 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); 230 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews);
223 }; 231 };
224 232
225 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 233 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698