| 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/tab_drag_controller.h" | 5 #include "chrome/browser/ui/views/tabs/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/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 point_in_screen.x() - | 375 point_in_screen.x() - |
| 376 mouse_offset_.x(), 0); | 376 mouse_offset_.x(), 0); |
| 377 widget->SetVisibilityChangedAnimationsEnabled(false); | 377 widget->SetVisibilityChangedAnimationsEnabled(false); |
| 378 widget->Restore(); | 378 widget->Restore(); |
| 379 widget->SetBounds(new_bounds); | 379 widget->SetBounds(new_bounds); |
| 380 AdjustBrowserAndTabBoundsForDrag(last_tabstrip_width, | 380 AdjustBrowserAndTabBoundsForDrag(last_tabstrip_width, |
| 381 point_in_screen, | 381 point_in_screen, |
| 382 &drag_bounds); | 382 &drag_bounds); |
| 383 widget->SetVisibilityChangedAnimationsEnabled(true); | 383 widget->SetVisibilityChangedAnimationsEnabled(true); |
| 384 } | 384 } |
| 385 RunMoveLoop(GetWindowOffset(point_in_screen)); | 385 RunMoveLoop(GetWindowOffset(start_point_in_screen_)); |
| 386 return; | 386 return; |
| 387 } | 387 } |
| 388 } | 388 } |
| 389 | 389 |
| 390 ContinueDragging(point_in_screen); | 390 ContinueDragging(point_in_screen); |
| 391 } | 391 } |
| 392 | 392 |
| 393 void TabDragController::EndDrag(EndDragReason reason) { | 393 void TabDragController::EndDrag(EndDragReason reason) { |
| 394 TRACE_EVENT0("views", "TabDragController::EndDrag"); | 394 TRACE_EVENT0("views", "TabDragController::EndDrag"); |
| 395 | 395 |
| (...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1807 // window which was used for dragging is not hidden once all of its tabs are | 1807 // window which was used for dragging is not hidden once all of its tabs are |
| 1808 // attached to another browser window in DragBrowserToNewTabStrip(). | 1808 // attached to another browser window in DragBrowserToNewTabStrip(). |
| 1809 // TODO(pkotwicz): Fix this properly (crbug.com/358482) | 1809 // TODO(pkotwicz): Fix this properly (crbug.com/358482) |
| 1810 for (auto* browser : *BrowserList::GetInstance()) { | 1810 for (auto* browser : *BrowserList::GetInstance()) { |
| 1811 if (browser->tab_strip_model()->empty()) | 1811 if (browser->tab_strip_model()->empty()) |
| 1812 exclude.insert(browser->window()->GetNativeWindow()); | 1812 exclude.insert(browser->window()->GetNativeWindow()); |
| 1813 } | 1813 } |
| 1814 #endif | 1814 #endif |
| 1815 return GetLocalProcessWindowAtPoint(screen_point, exclude); | 1815 return GetLocalProcessWindowAtPoint(screen_point, exclude); |
| 1816 } | 1816 } |
| OLD | NEW |