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

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 10986029: Attempt 3 at: Makes tab dragging code set bounds before creating window, that way (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eeaecff391fc4628d53a72fcde842ce189a33fb8..3f508289fb575f93b602a332a572c0f7853f8158 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -1922,8 +1922,6 @@ Browser* TabDragController::CreateBrowserForDrag(
const gfx::Point& point_in_screen,
gfx::Point* drag_offset,
std::vector<gfx::Rect>* drag_bounds) {
- Browser* browser = new Browser(
- Browser::CreateParams(drag_data_[0].contents->profile()));
gfx::Point center(0, source->height() / 2);
views::View::ConvertPointToWidget(source, &center);
gfx::Rect new_bounds(source->GetWidget()->GetWindowBoundsInScreen());
@@ -1951,8 +1949,10 @@ Browser* TabDragController::CreateBrowserForDrag(
*drag_offset = point_in_screen.Subtract(new_bounds.origin());
+ Browser::CreateParams create_params(drag_data_[0].contents->profile());
+ create_params.initial_bounds = new_bounds;
+ Browser* browser = new Browser(create_params);
SetTrackedByWorkspace(browser->window()->GetNativeWindow(), false);
- browser->window()->SetBounds(new_bounds);
return browser;
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698