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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_win.cc

Issue 10332197: SelectAll when activating the omni box via touch. Regular (short) touch should now work the same wa… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved the #ifndefs to the header file 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
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_view_win.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
index 982dd7f4ea7ec9b3105d200a0a6adf0473dbb810..44fe2aee647d33d0f6d87fea62671bcab2de0bda 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
@@ -1447,6 +1447,12 @@ LRESULT OmniboxViewWin::OnPointerDown(UINT message,
WPARAM wparam,
LPARAM lparam) {
SetFocus();
+
+ if (IS_POINTER_FIRSTBUTTON_WPARAM(wparam)) {
+ TrackMousePosition(kLeft, CPoint(GET_X_LPARAM(lparam),
+ GET_Y_LPARAM(lparam)));
+ }
+
// ITextInputPanel is not supported on all platforms. NULL is fine.
if (keyboard_ != NULL)
keyboard_->SetInPlaceVisibility(true);
@@ -1664,7 +1670,8 @@ LRESULT OmniboxViewWin::OnMouseActivate(HWND window,
// there. Also in those cases, we need to already know in OnSetFocus() that
// we should not restore the saved selection.
if (!model_->has_focus() &&
- ((mouse_message == WM_LBUTTONDOWN || mouse_message == WM_RBUTTONDOWN)) &&
+ ((mouse_message == WM_LBUTTONDOWN || mouse_message == WM_RBUTTONDOWN ||
+ mouse_message == WM_POINTERDOWN)) &&
(result == MA_ACTIVATE)) {
DCHECK(!gaining_focus_.get());
gaining_focus_.reset(new ScopedFreeze(this, GetTextObjectModel()));
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698