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

Unified 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: reviews Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/tabs/tab_drag_controller.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index 2fbf5ed41cd1eb1e1f0c290d468c9783c0c3b51c..1e2d451dfeac38c2250f274d5384a84348b02d5e 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -1795,12 +1795,12 @@ gfx::NativeWindow TabDragController::GetLocalProcessWindow(
const gfx::Point& screen_point,
bool exclude_dragged_view) {
std::set<gfx::NativeWindow> exclude;
- if (exclude_dragged_view) {
- gfx::NativeWindow dragged_window =
- attached_tabstrip_->GetWidget()->GetNativeWindow();
- if (dragged_window)
- exclude.insert(dragged_window);
- }
+ gfx::NativeWindow dragged_window =
+ attached_tabstrip_->GetWidget()->GetNativeWindow();
+ if (exclude_dragged_view && dragged_window)
+ exclude.insert(dragged_window);
+ gfx::NativeWindow root_window =
+ dragged_window ? dragged_window->GetRootWindow() : nullptr;
mfomitchev 2015/10/30 20:37:34 Is it actually possible for dragged_window to be n
bshe 2015/10/30 20:57:05 Yes. It sounds strange. But the original code seem
mfomitchev 2015/10/30 21:28:33 Should we just bail and return null in this case?
bshe 2015/11/02 13:46:43 I seems to me that it wont be null for aura androi
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
// Exclude windows which are pending deletion via Browser::TabStripEmpty().
// These windows can be returned in the Linux Aura port because the browser
@@ -1815,8 +1815,6 @@ gfx::NativeWindow TabDragController::GetLocalProcessWindow(
exclude.insert((*it)->window()->GetNativeWindow());
}
#endif
- return GetLocalProcessWindowAtPoint(host_desktop_type_,
- screen_point,
- exclude);
-
+ return GetLocalProcessWindowAtPoint(host_desktop_type_, screen_point, exclude,
+ root_window);
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/window_finder.h » ('j') | chrome/browser/ui/views/tabs/window_finder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698