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

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

Issue 1421083003: Introduces window_finder_android.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 1 month 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
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 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 1788
1789 gfx::Point point = point_in_screen; 1789 gfx::Point point = point_in_screen;
1790 views::View::ConvertPointFromScreen(toplevel_view, &point); 1790 views::View::ConvertPointFromScreen(toplevel_view, &point);
1791 return point.OffsetFromOrigin(); 1791 return point.OffsetFromOrigin();
1792 } 1792 }
1793 1793
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 gfx::NativeWindow dragged_window =
1799 gfx::NativeWindow dragged_window = 1799 attached_tabstrip_->GetWidget()->GetNativeWindow();
1800 attached_tabstrip_->GetWidget()->GetNativeWindow(); 1800 if (exclude_dragged_view && dragged_window)
1801 if (dragged_window) 1801 exclude.insert(dragged_window);
1802 exclude.insert(dragged_window); 1802 gfx::NativeWindow root_window =
1803 } 1803 dragged_window ? dragged_window->GetRootWindow() : nullptr;
sky 2015/11/06 17:26:56 This is aura specific right? Can we instead pass i
bshe 2015/11/06 21:13:21 Done.
1804 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 1804 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
1805 // Exclude windows which are pending deletion via Browser::TabStripEmpty(). 1805 // Exclude windows which are pending deletion via Browser::TabStripEmpty().
1806 // These windows can be returned in the Linux Aura port because the browser 1806 // 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 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 BrowserList* browser_list = BrowserList::GetInstance( 1810 BrowserList* browser_list = BrowserList::GetInstance(
1811 chrome::HOST_DESKTOP_TYPE_NATIVE); 1811 chrome::HOST_DESKTOP_TYPE_NATIVE);
1812 for (BrowserList::const_iterator it = browser_list->begin(); 1812 for (BrowserList::const_iterator it = browser_list->begin();
1813 it != browser_list->end(); ++it) { 1813 it != browser_list->end(); ++it) {
1814 if ((*it)->tab_strip_model()->empty()) 1814 if ((*it)->tab_strip_model()->empty())
1815 exclude.insert((*it)->window()->GetNativeWindow()); 1815 exclude.insert((*it)->window()->GetNativeWindow());
1816 } 1816 }
1817 #endif 1817 #endif
1818 return GetLocalProcessWindowAtPoint(host_desktop_type_, 1818 return GetLocalProcessWindowAtPoint(host_desktop_type_, screen_point, exclude,
1819 screen_point, 1819 root_window);
1820 exclude);
1821
1822 } 1820 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698