| Index: chrome/browser/fullscreen_win.cc
|
| diff --git a/chrome/browser/fullscreen_win.cc b/chrome/browser/fullscreen_win.cc
|
| index 4c3da9f29fad7a4b4a4cb00b521d832f03656ecd..ad8f60431350c65537eba094ca6e72b515f9c8f8 100644
|
| --- a/chrome/browser/fullscreen_win.cc
|
| +++ b/chrome/browser/fullscreen_win.cc
|
| @@ -13,6 +13,7 @@
|
| #if defined(USE_ASH)
|
| #include "ash/wm/window_util.h"
|
| #include "chrome/browser/ui/host_desktop.h"
|
| +#include "ui/aura/window.h"
|
| #endif
|
|
|
| static bool IsPlatformFullScreenMode() {
|
| @@ -100,10 +101,23 @@ static bool IsFullScreenConsoleMode() {
|
| return (modes & (CONSOLE_FULLSCREEN | CONSOLE_FULLSCREEN_HARDWARE)) != 0;
|
| }
|
|
|
| +#if defined(USE_ASH)
|
| +// Returns true if the active window or one its ancestors is fullscreen.
|
| +static bool IsActiveWindowFullscreen() {
|
| + aura::Window* window = ash::wm::GetActiveWindow();
|
| + while (window) {
|
| + if (ash::wm::IsWindowFullscreen(window))
|
| + return true;
|
| + window = window->parent();
|
| + }
|
| + return false;
|
| +}
|
| +#endif
|
| +
|
| bool IsFullScreenMode() {
|
| #if defined(USE_ASH)
|
| if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH)
|
| - return ash::wm::IsActiveWindowFullscreen();
|
| + return IsActiveWindowFullscreen();
|
| #endif
|
| return IsPlatformFullScreenMode() ||
|
| IsFullScreenWindowMode() ||
|
|
|