| 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 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 // enough to trigger a drag. | 1351 // enough to trigger a drag. |
| 1352 if (started_drag_) { | 1352 if (started_drag_) { |
| 1353 RestoreFocus(); | 1353 RestoreFocus(); |
| 1354 if (type == CANCELED) | 1354 if (type == CANCELED) |
| 1355 RevertDrag(); | 1355 RevertDrag(); |
| 1356 else | 1356 else |
| 1357 CompleteDrag(); | 1357 CompleteDrag(); |
| 1358 } | 1358 } |
| 1359 } else if (drag_data_.size() > 1) { | 1359 } else if (drag_data_.size() > 1) { |
| 1360 initial_selection_model_.Clear(); | 1360 initial_selection_model_.Clear(); |
| 1361 RevertDrag(); | 1361 if (started_drag_) |
| 1362 RevertDrag(); |
| 1362 } // else case the only tab we were dragging was deleted. Nothing to do. | 1363 } // else case the only tab we were dragging was deleted. Nothing to do. |
| 1363 | 1364 |
| 1364 // Clear out drag data so we don't attempt to do anything with it. | 1365 // Clear out drag data so we don't attempt to do anything with it. |
| 1365 drag_data_.clear(); | 1366 drag_data_.clear(); |
| 1366 | 1367 |
| 1367 TabStrip* owning_tabstrip = attached_tabstrip_ ? | 1368 TabStrip* owning_tabstrip = attached_tabstrip_ ? |
| 1368 attached_tabstrip_ : source_tabstrip_; | 1369 attached_tabstrip_ : source_tabstrip_; |
| 1369 owning_tabstrip->DestroyDragController(); | 1370 owning_tabstrip->DestroyDragController(); |
| 1370 } | 1371 } |
| 1371 | 1372 |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1785 it != browser_list->end(); ++it) { | 1786 it != browser_list->end(); ++it) { |
| 1786 if ((*it)->tab_strip_model()->empty()) | 1787 if ((*it)->tab_strip_model()->empty()) |
| 1787 exclude.insert((*it)->window()->GetNativeWindow()); | 1788 exclude.insert((*it)->window()->GetNativeWindow()); |
| 1788 } | 1789 } |
| 1789 #endif | 1790 #endif |
| 1790 return GetLocalProcessWindowAtPoint(host_desktop_type_, | 1791 return GetLocalProcessWindowAtPoint(host_desktop_type_, |
| 1791 screen_point, | 1792 screen_point, |
| 1792 exclude); | 1793 exclude); |
| 1793 | 1794 |
| 1794 } | 1795 } |
| OLD | NEW |