Chromium Code Reviews| Index: chrome/browser/extensions/api/app_window/app_window_api.cc |
| diff --git a/chrome/browser/extensions/api/app_window/app_window_api.cc b/chrome/browser/extensions/api/app_window/app_window_api.cc |
| index 1f726db950869721bfeacc309dadf83f108de687..4aa219e7058752737d930c0925eaab439324c862 100644 |
| --- a/chrome/browser/extensions/api/app_window/app_window_api.cc |
| +++ b/chrome/browser/extensions/api/app_window/app_window_api.cc |
| @@ -24,6 +24,10 @@ |
| #include "googleurl/src/gurl.h" |
| #include "ui/gfx/rect.h" |
| +#if defined(USE_ASH) |
| +#include "ash/shell.h" |
| +#endif |
| + |
| namespace app_window = extensions::api::app_window; |
| namespace Create = app_window::Create; |
| @@ -101,6 +105,11 @@ bool AppWindowCreateFunction::RunImpl() { |
| // with a hack in AppWindowCustomBindings::GetView(). |
| ShellWindow::CreateParams create_params; |
| app_window::CreateWindowOptions* options = params->options.get(); |
| +#if defined(USE_ASH) |
| + bool force_maximize = ash::Shell::IsForcedMaximizeMode(); |
|
James Cook
2013/04/23 18:27:33
I like this better - less strange ifdef-induced in
Mr4D (OOO till 08-26)
2013/04/23 22:24:00
Right - but it is adding code which is only needed
|
| +#else |
| + bool force_maximize = false; |
| +#endif |
| if (options) { |
| if (options->id.get()) { |
| // TODO(mek): use URL if no id specified? |
| @@ -227,9 +236,14 @@ bool AppWindowCreateFunction::RunImpl() { |
| create_params.state = ShellWindow::CreateParams::STATE_MINIMIZED; |
| break; |
| } |
| + } else { |
| + force_maximize = false; |
| } |
| } |
| + if (force_maximize) |
| + create_params.state = ShellWindow::CreateParams::STATE_MAXIMIZED; |
| + |
| create_params.creator_process_id = |
| render_view_host_->GetProcess()->GetID(); |