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 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1794 gfx::NativeWindow TabDragController::GetLocalProcessWindow( | 1794 gfx::NativeWindow TabDragController::GetLocalProcessWindow( |
1795 const gfx::Point& screen_point, | 1795 const gfx::Point& screen_point, |
1796 bool exclude_dragged_view) { | 1796 bool exclude_dragged_view) { |
1797 std::set<gfx::NativeWindow> exclude; | 1797 std::set<gfx::NativeWindow> exclude; |
1798 if (exclude_dragged_view) { | 1798 if (exclude_dragged_view) { |
1799 gfx::NativeWindow dragged_window = | 1799 gfx::NativeWindow dragged_window = |
1800 attached_tabstrip_->GetWidget()->GetNativeWindow(); | 1800 attached_tabstrip_->GetWidget()->GetNativeWindow(); |
1801 if (dragged_window) | 1801 if (dragged_window) |
1802 exclude.insert(dragged_window); | 1802 exclude.insert(dragged_window); |
1803 } | 1803 } |
1804 #if defined(OS_ANDROID) | |
1805 gfx::NativeWindow dragged_window = | |
mfomitchev
2015/10/23 18:28:29
Seems like the right thing to do would be to put t
bshe
2015/10/30 19:56:23
Added window_finder_android.cc
| |
1806 attached_tabstrip_->GetWidget()->GetNativeWindow(); | |
1807 return GetLocalProcessWindowAtPointImpl(screen_point, exclude, | |
1808 dragged_window->GetRootWindow()); | |
1809 #endif | |
1804 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 1810 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
1805 // Exclude windows which are pending deletion via Browser::TabStripEmpty(). | 1811 // Exclude windows which are pending deletion via Browser::TabStripEmpty(). |
1806 // These windows can be returned in the Linux Aura port because the browser | 1812 // These windows can be returned in the Linux Aura port because the browser |
1807 // window which was used for dragging is not hidden once all of its tabs are | 1813 // window which was used for dragging is not hidden once all of its tabs are |
1808 // attached to another browser window in DragBrowserToNewTabStrip(). | 1814 // attached to another browser window in DragBrowserToNewTabStrip(). |
1809 // TODO(pkotwicz): Fix this properly (crbug.com/358482) | 1815 // TODO(pkotwicz): Fix this properly (crbug.com/358482) |
1810 BrowserList* browser_list = BrowserList::GetInstance( | 1816 BrowserList* browser_list = BrowserList::GetInstance( |
1811 chrome::HOST_DESKTOP_TYPE_NATIVE); | 1817 chrome::HOST_DESKTOP_TYPE_NATIVE); |
1812 for (BrowserList::const_iterator it = browser_list->begin(); | 1818 for (BrowserList::const_iterator it = browser_list->begin(); |
1813 it != browser_list->end(); ++it) { | 1819 it != browser_list->end(); ++it) { |
1814 if ((*it)->tab_strip_model()->empty()) | 1820 if ((*it)->tab_strip_model()->empty()) |
1815 exclude.insert((*it)->window()->GetNativeWindow()); | 1821 exclude.insert((*it)->window()->GetNativeWindow()); |
1816 } | 1822 } |
1817 #endif | 1823 #endif |
1818 return GetLocalProcessWindowAtPoint(host_desktop_type_, | 1824 return GetLocalProcessWindowAtPoint(host_desktop_type_, |
1819 screen_point, | 1825 screen_point, |
1820 exclude); | 1826 exclude); |
1821 | 1827 |
1822 } | 1828 } |
OLD | NEW |