Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Unified Diff: chrome/browser/fullscreen_win.cc

Issue 14340007: Hide the tab indicators and the shelf when in immersive + tab fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed kImmersiveModeKey Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() ||

Powered by Google App Engine
This is Rietveld 408576698