OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/dragged_tab_controller.h" | 5 #include "chrome/browser/ui/views/tabs/dragged_tab_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 18 matching lines...) Expand all Loading... |
29 #include "grit/theme_resources.h" | 29 #include "grit/theme_resources.h" |
30 #include "third_party/skia/include/core/SkBitmap.h" | 30 #include "third_party/skia/include/core/SkBitmap.h" |
31 #include "ui/base/animation/animation.h" | 31 #include "ui/base/animation/animation.h" |
32 #include "ui/base/animation/animation_delegate.h" | 32 #include "ui/base/animation/animation_delegate.h" |
33 #include "ui/base/animation/slide_animation.h" | 33 #include "ui/base/animation/slide_animation.h" |
34 #include "ui/base/events.h" | 34 #include "ui/base/events.h" |
35 #include "ui/base/resource/resource_bundle.h" | 35 #include "ui/base/resource/resource_bundle.h" |
36 #include "ui/gfx/canvas_skia.h" | 36 #include "ui/gfx/canvas_skia.h" |
37 #include "ui/gfx/screen.h" | 37 #include "ui/gfx/screen.h" |
38 #include "ui/views/events/event.h" | 38 #include "ui/views/events/event.h" |
39 #include "ui/views/widget/widget.h" | 39 #include "views/widget/widget.h" |
40 | 40 |
41 #if defined(TOOLKIT_USES_GTK) | 41 #if defined(TOOLKIT_USES_GTK) |
42 #include <gdk/gdk.h> // NOLINT | 42 #include <gdk/gdk.h> // NOLINT |
43 #include <gdk/gdkkeysyms.h> // NOLINT | 43 #include <gdk/gdkkeysyms.h> // NOLINT |
44 #endif | 44 #endif |
45 | 45 |
46 static const int kHorizontalMoveThreshold = 16; // Pixels. | 46 static const int kHorizontalMoveThreshold = 16; // Pixels. |
47 | 47 |
48 // If non-null there is a drag underway. | 48 // If non-null there is a drag underway. |
49 static DraggedTabController* instance_; | 49 static DraggedTabController* instance_; |
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 | 1402 |
1403 bool DraggedTabController::AreTabsConsecutive() { | 1403 bool DraggedTabController::AreTabsConsecutive() { |
1404 for (size_t i = 1; i < drag_data_.size(); ++i) { | 1404 for (size_t i = 1; i < drag_data_.size(); ++i) { |
1405 if (drag_data_[i - 1].source_model_index + 1 != | 1405 if (drag_data_[i - 1].source_model_index + 1 != |
1406 drag_data_[i].source_model_index) { | 1406 drag_data_[i].source_model_index) { |
1407 return false; | 1407 return false; |
1408 } | 1408 } |
1409 } | 1409 } |
1410 return true; | 1410 return true; |
1411 } | 1411 } |
OLD | NEW |