diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-09 09:13:55 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-09 09:13:55 +0000 |
commit | 435d43e09ce5c907be1892781a5d65a3d649b286 (patch) | |
tree | d86cf286646ec0856e4aa29bc8efd115ab34f71b /chrome/browser/ui/browser_commands.cc | |
parent | 6370121de1f821519af0496aa10dd7c256ea5246 (diff) | |
download | chromium_src-435d43e09ce5c907be1892781a5d65a3d649b286.zip chromium_src-435d43e09ce5c907be1892781a5d65a3d649b286.tar.gz chromium_src-435d43e09ce5c907be1892781a5d65a3d649b286.tar.bz2 |
Simple CreateParams conversions to using constructor with HostDesktopType.
Doing all the easy ones (no extra plumbing required) in one pass, will make separate CLs for others.
BUG=129187
Review URL: https://chromiumcodereview.appspot.com/11442025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_commands.cc')
-rw-r--r-- | chrome/browser/ui/browser_commands.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc index 246c86f..8876123 100644 --- a/chrome/browser/ui/browser_commands.cc +++ b/chrome/browser/ui/browser_commands.cc @@ -143,7 +143,8 @@ WebContents* GetOrCloneTabForDisposition(Browser* browser, } case NEW_WINDOW: { current_tab = current_tab->Clone(); - Browser* b = new Browser(Browser::CreateParams(browser->profile())); + Browser* b = new Browser(Browser::CreateParams( + browser->profile(), browser->host_desktop_type())); b->tab_strip_model()->AddWebContents( current_tab, -1, content::PAGE_TRANSITION_LINK, TabStripModel::ADD_ACTIVE); @@ -583,7 +584,8 @@ WebContents* DuplicateTabAt(Browser* browser, int index) { browser->profile())); } else if (browser->is_type_popup()) { browser = new Browser( - Browser::CreateParams(Browser::TYPE_POPUP, browser->profile())); + Browser::CreateParams(Browser::TYPE_POPUP, browser->profile(), + browser->host_desktop_type())); } // Preserve the size of the original window. The new window has already @@ -619,7 +621,8 @@ void ConvertPopupToTabbedBrowser(Browser* browser) { content::RecordAction(UserMetricsAction("ShowAsTab")); WebContents* contents = browser->tab_strip_model()->DetachWebContentsAt(browser->active_index()); - Browser* b = new Browser(Browser::CreateParams(browser->profile())); + Browser* b = new Browser(Browser::CreateParams(browser->profile(), + browser->host_desktop_type())); b->tab_strip_model()->AppendWebContents(contents, true); b->window()->Show(); } @@ -1015,7 +1018,8 @@ void ViewSource(Browser* browser, add_types); } else { Browser* b = new Browser( - Browser::CreateParams(Browser::TYPE_TABBED, browser->profile())); + Browser::CreateParams(Browser::TYPE_TABBED, browser->profile(), + browser->host_desktop_type())); // Preserve the size of the original window. The new window has already // been given an offset by the OS, so we shouldn't copy the old bounds. |