OLD | NEW |
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/default_tab_drag_controller.h" | 5 #include "chrome/browser/ui/views/tabs/default_tab_drag_controller.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 drag_data_[i].source_model_index) { | 1441 drag_data_[i].source_model_index) { |
1442 return false; | 1442 return false; |
1443 } | 1443 } |
1444 } | 1444 } |
1445 return true; | 1445 return true; |
1446 } | 1446 } |
1447 | 1447 |
1448 #if defined(USE_AURA) || defined(OS_WIN) | 1448 #if defined(USE_AURA) || defined(OS_WIN) |
1449 static bool ShouldCreateTabDragController2() { | 1449 static bool ShouldCreateTabDragController2() { |
1450 #if defined(USE_AURA) | 1450 #if defined(USE_AURA) |
1451 return !ash::Shell::GetInstance()->IsWindowModeCompact(); | 1451 return true; |
1452 #else | 1452 #else |
1453 return CommandLine::ForCurrentProcess()->HasSwitch( | 1453 return CommandLine::ForCurrentProcess()->HasSwitch( |
1454 switches::kTabBrowserDragging); | 1454 switches::kTabBrowserDragging); |
1455 #endif | 1455 #endif |
1456 } | 1456 } |
1457 #endif | 1457 #endif |
1458 | 1458 |
1459 // static | 1459 // static |
1460 TabDragController* TabDragController::Create( | 1460 TabDragController* TabDragController::Create( |
1461 TabStrip* source_tabstrip, | 1461 TabStrip* source_tabstrip, |
(...skipping 29 matching lines...) Expand all Loading... |
1491 } | 1491 } |
1492 | 1492 |
1493 // static | 1493 // static |
1494 bool TabDragController::IsActive() { | 1494 bool TabDragController::IsActive() { |
1495 #if defined(USE_AURA) || defined(OS_WIN) | 1495 #if defined(USE_AURA) || defined(OS_WIN) |
1496 return TabDragController2::IsActive() || (instance_ && instance_->active()); | 1496 return TabDragController2::IsActive() || (instance_ && instance_->active()); |
1497 #else | 1497 #else |
1498 return instance_ && instance_->active(); | 1498 return instance_ && instance_->active(); |
1499 #endif | 1499 #endif |
1500 } | 1500 } |
OLD | NEW |