| 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/base_tab_strip.h" | 5 #include "chrome/browser/ui/views/tabs/base_tab_strip.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/tabs/tab_strip_selection_model.h" | 8 #include "chrome/browser/tabs/tab_strip_selection_model.h" |
| 9 #include "chrome/browser/ui/view_ids.h" | 9 #include "chrome/browser/ui/view_ids.h" |
| 10 #include "chrome/browser/ui/views/tabs/dragged_tab_controller.h" | 10 #include "chrome/browser/ui/views/tabs/dragged_tab_controller.h" |
| 11 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" | 11 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" |
| 12 #include "ui/views/widget/root_view.h" | 12 #include "views/widget/root_view.h" |
| 13 #include "ui/views/widget/widget.h" | 13 #include "views/widget/widget.h" |
| 14 | 14 |
| 15 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
| 16 // GET_X_LPARAM, et al. | 16 // GET_X_LPARAM, et al. |
| 17 #include <windowsx.h> | 17 #include <windowsx.h> |
| 18 #endif | 18 #endif |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // Animation delegate used when a dragged tab is released. When done sets the | 22 // Animation delegate used when a dragged tab is released. When done sets the |
| 23 // dragging state to false. | 23 // dragging state to false. |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 // Animate the view back to its correct position. | 583 // Animate the view back to its correct position. |
| 584 GenerateIdealBounds(); | 584 GenerateIdealBounds(); |
| 585 AnimateToIdealBounds(); | 585 AnimateToIdealBounds(); |
| 586 } | 586 } |
| 587 bounds_animator_.AnimateViewTo(tab, ideal_bounds(TabIndexOfTab(tab))); | 587 bounds_animator_.AnimateViewTo(tab, ideal_bounds(TabIndexOfTab(tab))); |
| 588 // Install a delegate to reset the dragging state when done. We have to leave | 588 // Install a delegate to reset the dragging state when done. We have to leave |
| 589 // dragging true for the tab otherwise it'll draw beneath the new tab button. | 589 // dragging true for the tab otherwise it'll draw beneath the new tab button. |
| 590 bounds_animator_.SetAnimationDelegate( | 590 bounds_animator_.SetAnimationDelegate( |
| 591 tab, new ResetDraggingStateDelegate(tab), true); | 591 tab, new ResetDraggingStateDelegate(tab), true); |
| 592 } | 592 } |
| OLD | NEW |