| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/tabs/dragged_tab_controller.h" | 5 #include "chrome/browser/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 "app/animation.h" | 10 #include "app/animation.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/browser/views/tabs/tab_strip.h" | 22 #include "chrome/browser/views/tabs/tab_strip.h" |
| 23 #include "chrome/browser/tab_contents/tab_contents.h" | 23 #include "chrome/browser/tab_contents/tab_contents.h" |
| 24 #include "chrome/common/notification_service.h" | 24 #include "chrome/common/notification_service.h" |
| 25 #include "grit/theme_resources.h" | 25 #include "grit/theme_resources.h" |
| 26 #include "third_party/skia/include/core/SkBitmap.h" | 26 #include "third_party/skia/include/core/SkBitmap.h" |
| 27 #include "views/event.h" | 27 #include "views/event.h" |
| 28 #include "views/widget/root_view.h" | 28 #include "views/widget/root_view.h" |
| 29 #include "views/widget/widget.h" | 29 #include "views/widget/widget.h" |
| 30 #include "views/window/window.h" | 30 #include "views/window/window.h" |
| 31 | 31 |
| 32 #if defined(OS_WIN) |
| 33 #include "views/widget/widget_win.h" |
| 34 #endif |
| 35 |
| 32 static const int kHorizontalMoveThreshold = 16; // pixels | 36 static const int kHorizontalMoveThreshold = 16; // pixels |
| 33 | 37 |
| 34 // Threshold for pinned tabs. | 38 // Threshold for pinned tabs. |
| 35 static const int kHorizontalPinnedMoveThreshold = 4; // pixels | 39 static const int kHorizontalPinnedMoveThreshold = 4; // pixels |
| 36 | 40 |
| 37 // Amount, in pixels, from the edge of the tab strip that causes a non-pinned | 41 // Amount, in pixels, from the edge of the tab strip that causes a non-pinned |
| 38 // tab to be pinned. See description of pin_timer_ for details. | 42 // tab to be pinned. See description of pin_timer_ for details. |
| 39 static const int kHorizontalPinTabOffset = 16; | 43 static const int kHorizontalPinTabOffset = 16; |
| 40 | 44 |
| 41 // Delay, in ms, between when the user drags a tab to the edge of the tab strip | 45 // Delay, in ms, between when the user drags a tab to the edge of the tab strip |
| (...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 | 1390 |
| 1387 // The previous call made the window appear on top of the dragged window, | 1391 // The previous call made the window appear on top of the dragged window, |
| 1388 // move the dragged window to the front. | 1392 // move the dragged window to the front. |
| 1389 SetWindowPos(view_->GetWidget()->GetNativeView(), HWND_TOP, 0, 0, 0, 0, | 1393 SetWindowPos(view_->GetWidget()->GetNativeView(), HWND_TOP, 0, 0, 0, 0, |
| 1390 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); | 1394 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); |
| 1391 #else | 1395 #else |
| 1392 NOTIMPLEMENTED(); | 1396 NOTIMPLEMENTED(); |
| 1393 #endif | 1397 #endif |
| 1394 } | 1398 } |
| 1395 } | 1399 } |
| OLD | NEW |