| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 1dd945744ed3d6adbfce12c3a12fa449f719eab6..d3e8a63215c8ddd0ec0f4ba785e1bd08ab653128 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -777,6 +777,22 @@ WebContents* Browser::OpenApplicationWindow(
|
| CreateParams params(type, profile);
|
| params.app_name = app_name;
|
| params.initial_bounds = window_bounds;
|
| +
|
| +#if defined(USE_ASH)
|
| + if (extension &&
|
| + container == extension_misc::LAUNCH_WINDOW) {
|
| + // In ash, LAUNCH_FULLSCREEN launches in a maximized app window and
|
| + // LAUNCH_WINDOW launches in a normal app window.
|
| + ExtensionPrefs::LaunchType launch_type =
|
| + profile->GetExtensionService()->extension_prefs()->GetLaunchType(
|
| + extension->id(), ExtensionPrefs::LAUNCH_DEFAULT);
|
| + if (launch_type == ExtensionPrefs::LAUNCH_FULLSCREEN)
|
| + params.initial_show_state = ui::SHOW_STATE_MAXIMIZED;
|
| + else if (launch_type == ExtensionPrefs::LAUNCH_WINDOW)
|
| + params.initial_show_state = ui::SHOW_STATE_NORMAL;
|
| + }
|
| +#endif
|
| +
|
| Browser* browser = Browser::CreateWithParams(params);
|
|
|
| if (app_browser)
|
| @@ -792,18 +808,6 @@ WebContents* Browser::OpenApplicationWindow(
|
| if (extension && type == TYPE_PANEL)
|
| wrapper->extension_tab_helper()->SetExtensionAppIconById(extension->id());
|
|
|
| -#if defined(USE_ASH)
|
| - if (extension &&
|
| - container == extension_misc::LAUNCH_WINDOW) {
|
| - // In ash, LAUNCH_FULLSCREEN launches in a maximized app window.
|
| - ExtensionPrefs::LaunchType launch_type =
|
| - profile->GetExtensionService()->extension_prefs()->GetLaunchType(
|
| - extension->id(), ExtensionPrefs::LAUNCH_DEFAULT);
|
| - if (launch_type == ExtensionPrefs::LAUNCH_FULLSCREEN)
|
| - browser->window()->Maximize();
|
| - }
|
| -#endif
|
| -
|
| browser->window()->Show();
|
|
|
| // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial
|
|
|