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

Unified Diff: chrome/browser/ui/browser_tab_strip_model_delegate.cc

Issue 10692195: Consolidate Browser Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/browser_tab_strip_model_delegate.cc
===================================================================
--- chrome/browser/ui/browser_tab_strip_model_delegate.cc (revision 148382)
+++ chrome/browser/ui/browser_tab_strip_model_delegate.cc (working copy)
@@ -61,11 +61,11 @@
dock_info.AdjustOtherWindowBounds();
// Create an empty new browser window the same size as the old one.
- Browser* browser = new Browser(Browser::TYPE_TABBED, browser_->profile());
- browser->set_override_bounds(new_window_bounds);
- browser->set_initial_show_state(
- maximize ? ui::SHOW_STATE_MAXIMIZED : ui::SHOW_STATE_NORMAL);
- browser->InitBrowserWindow();
+ Browser::CreateParams params(browser_->profile());
+ params.initial_bounds = new_window_bounds;
+ params.initial_show_state =
+ maximize ? ui::SHOW_STATE_MAXIMIZED : ui::SHOW_STATE_NORMAL;
+ Browser* browser = new Browser(params);
browser->tab_strip_model()->AppendTabContents(detached_contents, true);
// Make sure the loading state is updated correctly, otherwise the throbber
// won't start if the page is loading.

Powered by Google App Engine
This is Rietveld 408576698