Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 1562843002: Revert of Introduces window_finder_android.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/tabs/window_finder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 1793
1794 gfx::Point point = point_in_screen; 1794 gfx::Point point = point_in_screen;
1795 views::View::ConvertPointFromScreen(toplevel_view, &point); 1795 views::View::ConvertPointFromScreen(toplevel_view, &point);
1796 return point.OffsetFromOrigin(); 1796 return point.OffsetFromOrigin();
1797 } 1797 }
1798 1798
1799 gfx::NativeWindow TabDragController::GetLocalProcessWindow( 1799 gfx::NativeWindow TabDragController::GetLocalProcessWindow(
1800 const gfx::Point& screen_point, 1800 const gfx::Point& screen_point,
1801 bool exclude_dragged_view) { 1801 bool exclude_dragged_view) {
1802 std::set<gfx::NativeWindow> exclude; 1802 std::set<gfx::NativeWindow> exclude;
1803 gfx::NativeWindow dragged_window = 1803 if (exclude_dragged_view) {
1804 attached_tabstrip_->GetWidget()->GetNativeWindow(); 1804 gfx::NativeWindow dragged_window =
1805 if (exclude_dragged_view && dragged_window) 1805 attached_tabstrip_->GetWidget()->GetNativeWindow();
1806 exclude.insert(dragged_window); 1806 if (dragged_window)
1807 exclude.insert(dragged_window);
1808 }
1807 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 1809 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
1808 // Exclude windows which are pending deletion via Browser::TabStripEmpty(). 1810 // Exclude windows which are pending deletion via Browser::TabStripEmpty().
1809 // These windows can be returned in the Linux Aura port because the browser 1811 // These windows can be returned in the Linux Aura port because the browser
1810 // window which was used for dragging is not hidden once all of its tabs are 1812 // window which was used for dragging is not hidden once all of its tabs are
1811 // attached to another browser window in DragBrowserToNewTabStrip(). 1813 // attached to another browser window in DragBrowserToNewTabStrip().
1812 // TODO(pkotwicz): Fix this properly (crbug.com/358482) 1814 // TODO(pkotwicz): Fix this properly (crbug.com/358482)
1813 BrowserList* browser_list = BrowserList::GetInstance( 1815 BrowserList* browser_list = BrowserList::GetInstance(
1814 chrome::HOST_DESKTOP_TYPE_NATIVE); 1816 chrome::HOST_DESKTOP_TYPE_NATIVE);
1815 for (BrowserList::const_iterator it = browser_list->begin(); 1817 for (BrowserList::const_iterator it = browser_list->begin();
1816 it != browser_list->end(); ++it) { 1818 it != browser_list->end(); ++it) {
1817 if ((*it)->tab_strip_model()->empty()) 1819 if ((*it)->tab_strip_model()->empty())
1818 exclude.insert((*it)->window()->GetNativeWindow()); 1820 exclude.insert((*it)->window()->GetNativeWindow());
1819 } 1821 }
1820 #endif 1822 #endif
1821 return GetLocalProcessWindowAtPoint(host_desktop_type_, screen_point, exclude, 1823 return GetLocalProcessWindowAtPoint(host_desktop_type_,
1822 dragged_window); 1824 screen_point,
1825 exclude);
1826
1823 } 1827 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/tabs/window_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698