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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 10824200: Handful of tweaks for tab dragging with touch: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows Created 8 years, 4 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/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index c73afe636af86db0fdedc8ad8e63a5884b19e4fa..f2f33a3e9363b1df69e151e602a64ac3eb3b96fe 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -1002,19 +1002,20 @@ void TabStrip::MaybeStartDrag(
TabDragController::DETACHABLE;
TabDragController::MoveBehavior move_behavior =
TabDragController::REORDER;
- // Use MOVE_VISIBILE_TABS in the following two conditions:
+ // Use MOVE_VISIBILE_TABS in the following conditions:
// . Mouse event generated from touch and the left button is down (the right
// button corresponds to a long press, which we want to reorder).
+ // . Gesture begin and control key isn't down.
// . Real mouse event and control is down. This is mostly for testing.
DCHECK(event.type() == ui::ET_MOUSE_PRESSED ||
event.type() == ui::ET_GESTURE_BEGIN);
- if (touch_layout_.get() &&
+ if (adjust_layout_ &&
((event.type() == ui::ET_MOUSE_PRESSED &&
(((event.flags() & ui::EF_FROM_TOUCH) &&
static_cast<const views::MouseEvent&>(event).IsLeftMouseButton()) ||
(!(event.flags() & ui::EF_FROM_TOUCH) &&
static_cast<const views::MouseEvent&>(event).IsControlDown()))) ||
- (event.type() == ui::ET_GESTURE_BEGIN))) {
+ (event.type() == ui::ET_GESTURE_BEGIN && !event.IsControlDown()))) {
move_behavior = TabDragController::MOVE_VISIBILE_TABS;
}
#if defined(OS_WIN)
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest_win.cc ('k') | chrome/test/base/in_process_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698