| 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 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1804 attached_tabstrip_->GetWidget()->GetNativeWindow(); | 1804 attached_tabstrip_->GetWidget()->GetNativeWindow(); |
| 1805 if (dragged_window) | 1805 if (dragged_window) |
| 1806 exclude.insert(dragged_window); | 1806 exclude.insert(dragged_window); |
| 1807 } | 1807 } |
| 1808 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 1808 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 1809 // Exclude windows which are pending deletion via Browser::TabStripEmpty(). | 1809 // Exclude windows which are pending deletion via Browser::TabStripEmpty(). |
| 1810 // These windows can be returned in the Linux Aura port because the browser | 1810 // These windows can be returned in the Linux Aura port because the browser |
| 1811 // window which was used for dragging is not hidden once all of its tabs are | 1811 // window which was used for dragging is not hidden once all of its tabs are |
| 1812 // attached to another browser window in DragBrowserToNewTabStrip(). | 1812 // attached to another browser window in DragBrowserToNewTabStrip(). |
| 1813 // TODO(pkotwicz): Fix this properly (crbug.com/358482) | 1813 // TODO(pkotwicz): Fix this properly (crbug.com/358482) |
| 1814 BrowserList* browser_list = BrowserList::GetInstance( | 1814 for (auto& browser : *BrowserList::GetInstance()) { |
| 1815 chrome::HOST_DESKTOP_TYPE_NATIVE); | 1815 if (browser->tab_strip_model()->empty()) |
| 1816 for (BrowserList::const_iterator it = browser_list->begin(); | 1816 exclude.insert(browser->window()->GetNativeWindow()); |
| 1817 it != browser_list->end(); ++it) { | |
| 1818 if ((*it)->tab_strip_model()->empty()) | |
| 1819 exclude.insert((*it)->window()->GetNativeWindow()); | |
| 1820 } | 1817 } |
| 1821 #endif | 1818 #endif |
| 1822 return GetLocalProcessWindowAtPoint(host_desktop_type_, | 1819 return GetLocalProcessWindowAtPoint(host_desktop_type_, |
| 1823 screen_point, | 1820 screen_point, |
| 1824 exclude); | 1821 exclude); |
| 1825 | 1822 |
| 1826 } | 1823 } |
| OLD | NEW |