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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 12886030: Changes the tabstrip so that when in touch mode and the tabs are not (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment 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) 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 #include "chrome/browser/ui/views/tabs/tab_strip.h" 5 #include "chrome/browser/ui/views/tabs/tab_strip.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windowsx.h> 8 #include <windowsx.h>
9 #endif 9 #endif
10 10
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 TabDragController::DETACHABLE; 1077 TabDragController::DETACHABLE;
1078 TabDragController::MoveBehavior move_behavior = 1078 TabDragController::MoveBehavior move_behavior =
1079 TabDragController::REORDER; 1079 TabDragController::REORDER;
1080 // Use MOVE_VISIBILE_TABS in the following conditions: 1080 // Use MOVE_VISIBILE_TABS in the following conditions:
1081 // . Mouse event generated from touch and the left button is down (the right 1081 // . Mouse event generated from touch and the left button is down (the right
1082 // button corresponds to a long press, which we want to reorder). 1082 // button corresponds to a long press, which we want to reorder).
1083 // . Gesture begin and control key isn't down. 1083 // . Gesture begin and control key isn't down.
1084 // . Real mouse event and control is down. This is mostly for testing. 1084 // . Real mouse event and control is down. This is mostly for testing.
1085 DCHECK(event.type() == ui::ET_MOUSE_PRESSED || 1085 DCHECK(event.type() == ui::ET_MOUSE_PRESSED ||
1086 event.type() == ui::ET_GESTURE_BEGIN); 1086 event.type() == ui::ET_GESTURE_BEGIN);
1087 if (adjust_layout_ && 1087 if (touch_layout_.get() &&
1088 ((event.type() == ui::ET_MOUSE_PRESSED && 1088 ((event.type() == ui::ET_MOUSE_PRESSED &&
1089 (((event.flags() & ui::EF_FROM_TOUCH) && 1089 (((event.flags() & ui::EF_FROM_TOUCH) &&
1090 static_cast<const ui::MouseEvent&>(event).IsLeftMouseButton()) || 1090 static_cast<const ui::MouseEvent&>(event).IsLeftMouseButton()) ||
1091 (!(event.flags() & ui::EF_FROM_TOUCH) && 1091 (!(event.flags() & ui::EF_FROM_TOUCH) &&
1092 static_cast<const ui::MouseEvent&>(event).IsControlDown()))) || 1092 static_cast<const ui::MouseEvent&>(event).IsControlDown()))) ||
1093 (event.type() == ui::ET_GESTURE_BEGIN && !event.IsControlDown()))) { 1093 (event.type() == ui::ET_GESTURE_BEGIN && !event.IsControlDown()))) {
1094 move_behavior = TabDragController::MOVE_VISIBILE_TABS; 1094 move_behavior = TabDragController::MOVE_VISIBILE_TABS;
1095 } 1095 }
1096 #if defined(OS_WIN) 1096 #if defined(OS_WIN)
1097 // It doesn't make sense to drag tabs out on Win8's single window Metro mode. 1097 // It doesn't make sense to drag tabs out on Win8's single window Metro mode.
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 if (!adjust_layout_) 2593 if (!adjust_layout_)
2594 return false; 2594 return false;
2595 2595
2596 #if !defined(OS_CHROMEOS) 2596 #if !defined(OS_CHROMEOS)
2597 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) 2597 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH)
2598 return false; 2598 return false;
2599 #endif 2599 #endif
2600 2600
2601 return true; 2601 return true;
2602 } 2602 }
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