| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/notifications/fullscreen_notification_blocker.h" | 5 #include "chrome/browser/notifications/fullscreen_notification_blocker.h" |
| 6 | 6 |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/fullscreen.h" | 9 #include "chrome/browser/fullscreen.h" |
| 10 #include "content/public/browser/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
| 11 | 11 |
| 12 #if defined(USE_ASH) | 12 #if defined(USE_ASH) |
| 13 #include "ash/common/system/system_notifier.h" |
| 13 #include "ash/common/wm/window_state.h" | 14 #include "ash/common/wm/window_state.h" |
| 14 #include "ash/root_window_controller.h" | 15 #include "ash/root_window_controller.h" |
| 15 #include "ash/shell.h" | 16 #include "ash/shell.h" |
| 16 #include "ash/system/system_notifier.h" | |
| 17 #include "ash/wm/window_state_aura.h" | 17 #include "ash/wm/window_state_aura.h" |
| 18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
| 19 #include "ui/aura/window_event_dispatcher.h" | 19 #include "ui/aura/window_event_dispatcher.h" |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 bool DoesFullscreenModeBlockNotifications() { | 24 bool DoesFullscreenModeBlockNotifications() { |
| 25 #if defined(USE_ASH) | 25 #if defined(USE_ASH) |
| 26 if (ash::Shell::HasInstance()) { | 26 if (ash::Shell::HasInstance()) { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 return enabled; | 77 return enabled; |
| 78 } | 78 } |
| 79 | 79 |
| 80 void FullscreenNotificationBlocker::Observe( | 80 void FullscreenNotificationBlocker::Observe( |
| 81 int type, | 81 int type, |
| 82 const content::NotificationSource& source, | 82 const content::NotificationSource& source, |
| 83 const content::NotificationDetails& details) { | 83 const content::NotificationDetails& details) { |
| 84 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); | 84 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); |
| 85 CheckState(); | 85 CheckState(); |
| 86 } | 86 } |
| OLD | NEW |