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

Unified Diff: chrome/browser/notifications/fullscreen_notification_blocker.cc

Issue 32943006: [Refactor] Replace kFullscreenUsesMinimalChromeKey with WindowState::hide_shelf_when_fullscreen() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 2 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
« no previous file with comments | « ash/wm/window_state.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/fullscreen_notification_blocker.cc
diff --git a/chrome/browser/notifications/fullscreen_notification_blocker.cc b/chrome/browser/notifications/fullscreen_notification_blocker.cc
index 0d5b350dff4284fa3261cc19d46974585d740f11..bbfa5825abc6c5028453bc0868bb84e7d4096f76 100644
--- a/chrome/browser/notifications/fullscreen_notification_blocker.cc
+++ b/chrome/browser/notifications/fullscreen_notification_blocker.cc
@@ -13,7 +13,7 @@
#include "ash/root_window_controller.h"
#include "ash/shell.h"
#include "ash/system/system_notifier.h"
-#include "ash/wm/window_properties.h"
+#include "ash/wm/window_state.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
#endif
@@ -30,13 +30,14 @@ bool DoesFullscreenModeBlockNotifications() {
if (!controller)
return false;
+ // Block notifications if the shelf is hidden because of a fullscreen
+ // window.
const aura::Window* fullscreen_window =
controller->GetTopmostFullscreenWindow();
-
- // Should appear notifications if kFullscreenUsesMinimalChromeKey is set,
- // since shelf/message_center UI is visible in such situation.
- return fullscreen_window && !fullscreen_window->GetProperty(
- ash::internal::kFullscreenUsesMinimalChromeKey);
+ if (!fullscreen_window)
+ return false;
+ return ash::wm::GetWindowState(fullscreen_window)->
+ hide_shelf_when_fullscreen();
}
#endif
« no previous file with comments | « ash/wm/window_state.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698