Commit 5a45cc91 authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Use attached browser CreateParams in CreateBrowserForDrag

Use the attached browser CreateParams rather than
BrowserList GetLastActive.

It feels safer that the attached browser will always
be the one that we want whereas BrowserList GetLastActive
may not be so reliable.

Bug: 1012169
Change-Id: Ifbbc13aa797db7942f5ce1d52decdac264c5d927
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1862875
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706220}
parent 4fed6f1e
...@@ -1968,7 +1968,10 @@ Browser* TabDragController::CreateBrowserForDrag( ...@@ -1968,7 +1968,10 @@ Browser* TabDragController::CreateBrowserForDrag(
*drag_offset = point_in_screen - new_bounds.origin(); *drag_offset = point_in_screen - new_bounds.origin();
Browser::CreateParams create_params = Browser::CreateParams create_params =
BrowserList::GetInstance()->GetLastActive()->create_params(); BrowserView::GetBrowserViewForNativeWindow(
GetAttachedBrowserWidget()->GetNativeWindow())
->browser()
->create_params();
create_params.user_gesture = true; create_params.user_gesture = true;
create_params.in_tab_dragging = true; create_params.in_tab_dragging = true;
create_params.initial_bounds = new_bounds; create_params.initial_bounds = new_bounds;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment