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

Side by Side Diff: ui/views/controls/textfield/native_textfield_views.cc

Issue 12408023: Fix views omnibox unfocused double-click behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "ui/views/controls/textfield/native_textfield_views.h" 5 #include "ui/views/controls/textfield/native_textfield_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 bool can_drag = true; 1339 bool can_drag = true;
1340 1340
1341 switch (aggregated_clicks_) { 1341 switch (aggregated_clicks_) {
1342 case 0: 1342 case 0:
1343 if (can_drag && GetRenderText()->IsPointInSelection(event.location())) 1343 if (can_drag && GetRenderText()->IsPointInSelection(event.location()))
1344 initiating_drag_ = true; 1344 initiating_drag_ = true;
1345 else 1345 else
1346 MoveCursorTo(event.location(), event.IsShiftDown()); 1346 MoveCursorTo(event.location(), event.IsShiftDown());
1347 break; 1347 break;
1348 case 1: 1348 case 1:
1349 MoveCursorTo(event.location(), false);
1349 model_->SelectWord(); 1350 model_->SelectWord();
1350 OnCaretBoundsChanged(); 1351 OnCaretBoundsChanged();
1351 break; 1352 break;
1352 case 2: 1353 case 2:
1353 model_->SelectAll(false); 1354 model_->SelectAll(false);
1354 OnCaretBoundsChanged(); 1355 OnCaretBoundsChanged();
1355 break; 1356 break;
1356 default: 1357 default:
1357 NOTREACHED(); 1358 NOTREACHED();
1358 } 1359 }
(...skipping 28 matching lines...) Expand all
1387 1388
1388 void NativeTextfieldViews::PlatformGestureEventHandling( 1389 void NativeTextfieldViews::PlatformGestureEventHandling(
1389 const ui::GestureEvent* event) { 1390 const ui::GestureEvent* event) {
1390 #if defined(OS_WIN) && defined(USE_AURA) 1391 #if defined(OS_WIN) && defined(USE_AURA)
1391 if (event->type() == ui::ET_GESTURE_TAP_DOWN && !textfield_->read_only()) 1392 if (event->type() == ui::ET_GESTURE_TAP_DOWN && !textfield_->read_only())
1392 base::win::DisplayVirtualKeyboard(); 1393 base::win::DisplayVirtualKeyboard();
1393 #endif 1394 #endif
1394 } 1395 }
1395 1396
1396 } // namespace views 1397 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698