| 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" |
| 11 #include "app/gfx/chrome_canvas.h" | 11 #include "app/gfx/chrome_canvas.h" |
| 12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
| 13 #include "chrome/browser/browser_window.h" | 13 #include "chrome/browser/browser_window.h" |
| 14 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 14 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 15 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
| 16 #include "chrome/browser/metrics/user_metrics.h" | 16 #include "chrome/browser/metrics/user_metrics.h" |
| 17 #include "chrome/browser/views/frame/browser_view.h" | 17 #include "chrome/browser/views/frame/browser_view.h" |
| 18 #include "chrome/browser/views/tabs/dragged_tab_view.h" | 18 #include "chrome/browser/views/tabs/dragged_tab_view.h" |
| 19 #include "chrome/browser/views/tabs/hwnd_photobooth.h" | 19 #include "chrome/browser/views/tabs/hwnd_photobooth.h" |
| 20 #include "chrome/browser/views/tabs/tab.h" | 20 #include "chrome/browser/views/tabs/tab.h" |
| 21 #include "chrome/browser/views/tabs/tab_strip.h" | 21 #include "chrome/browser/views/tabs/tab_strip.h" |
| 22 #include "chrome/browser/tab_contents/tab_contents.h" | 22 #include "chrome/browser/tab_contents/tab_contents.h" |
| 23 #include "chrome/common/notification_service.h" | 23 #include "chrome/common/notification_service.h" |
| 24 #include "grit/theme_resources.h" | 24 #include "grit/theme_resources.h" |
| 25 #include "skia/include/SkBitmap.h" | 25 #include "third_party/skia/include/core/SkBitmap.h" |
| 26 #include "views/event.h" | 26 #include "views/event.h" |
| 27 #include "views/widget/root_view.h" | 27 #include "views/widget/root_view.h" |
| 28 | 28 |
| 29 static const int kHorizontalMoveThreshold = 16; // pixels | 29 static const int kHorizontalMoveThreshold = 16; // pixels |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 // Delay, in ms, during dragging before we bring a window to front. | 33 // Delay, in ms, during dragging before we bring a window to front. |
| 34 const int kBringToFrontDelay = 750; | 34 const int kBringToFrontDelay = 750; |
| 35 | 35 |
| (...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 // Move the window to the front. | 1143 // Move the window to the front. |
| 1144 SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, | 1144 SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, |
| 1145 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); | 1145 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); |
| 1146 | 1146 |
| 1147 // The previous call made the window appear on top of the dragged window, | 1147 // The previous call made the window appear on top of the dragged window, |
| 1148 // move the dragged window to the front. | 1148 // move the dragged window to the front. |
| 1149 SetWindowPos(view_->GetWidget()->GetNativeView(), HWND_TOP, 0, 0, 0, 0, | 1149 SetWindowPos(view_->GetWidget()->GetNativeView(), HWND_TOP, 0, 0, 0, 0, |
| 1150 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); | 1150 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); |
| 1151 } | 1151 } |
| 1152 } | 1152 } |
| OLD | NEW |