Chromium Code Reviews| Index: apps/app_window_contents.cc |
| diff --git a/apps/app_window_contents.cc b/apps/app_window_contents.cc |
| index 751ccc2d3535152d0e65a6e01c14455e372bb777..8c8632f6e80d8c4ad68006416de0884539aa51e1 100644 |
| --- a/apps/app_window_contents.cc |
| +++ b/apps/app_window_contents.cc |
| @@ -94,11 +94,26 @@ void AppWindowContents::NativeWindowChanged( |
| update.width.reset(new int(bounds.width())); |
| update.height.reset(new int(bounds.height())); |
| dictionary->Set("bounds", update.ToValue().release()); |
| - dictionary->SetBoolean("fullscreen", |
| - native_app_window->IsFullscreenOrPending()); |
| - dictionary->SetBoolean("minimized", native_app_window->IsMinimized()); |
| - dictionary->SetBoolean("maximized", native_app_window->IsMaximized()); |
| dictionary->SetBoolean("alwaysOnTop", native_app_window->IsAlwaysOnTop()); |
| + dictionary->SetBoolean("minimized", native_app_window->IsMinimized()); |
| + |
| + bool maximized = native_app_window->IsMaximized(); |
| + ShellWindow::FullscreenType fullscreen_type = host_->fullscreen_type(); |
| + // Check both the fullscreen type and |native_app_window| so that the window |
| + // is reported as fullscreen if |native_app_window|'s fullscreen state lags |
| + // behind that of ShellWindow. (This is the case in the GTK port). |
| + bool fullscreen = (fullscreen_type != ShellWindow::FULLSCREEN_TYPE_NONE) || |
| + native_app_window->IsFullscreen(); |
| + if (fullscreen_type == ShellWindow::FULLSCREEN_TYPE_IMMERSIVE) { |
| + // A window in immersive fullscreen on ChromeOS does not take up all of the |
| + // pixels on screen because the shelf is auto hidden, not completely hidden. |
| + // For this reason, immersive fullscreen windows are considered maximized |
| + // for the sake of the app.window api. |
|
pkotwicz
2013/11/13 00:10:13
I am not sure whether telling the app that we are
benwells
2013/11/13 07:41:27
I think it is probably full screen enough to say i
pkotwicz
2013/11/13 22:06:01
IsFullscreenOrPending() is back. I removed it in t
|
| + fullscreen = false; |
| + maximized = true; |
| + } |
| + dictionary->SetBoolean("fullscreen", fullscreen); |
| + dictionary->SetBoolean("maximized", maximized); |
| const ShellWindow::SizeConstraints& size_constraints = |
| host_->size_constraints(); |