| 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/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/fullscreen.h" | 10 #include "chrome/browser/fullscreen.h" |
| 11 #include "content/public/browser/notification_service.h" | 11 #include "content/public/browser/notification_service.h" |
| 12 #include "ui/display/types/display_constants.h" | 12 #include "ui/display/types/display_constants.h" |
| 13 #include "ui/message_center/notifier_settings.h" | 13 #include "ui/message_center/notifier_settings.h" |
| 14 | 14 |
| 15 #if defined(USE_ASH) | 15 #if defined(USE_ASH) |
| 16 #include "ash/root_window_controller.h" | 16 #include "ash/root_window_controller.h" |
| 17 #include "ash/shell.h" | 17 #include "ash/shell.h" |
| 18 #include "ash/system/system_notifier.h" | 18 #include "ash/system/system_notifier.h" |
| 19 #include "ash/wm/window_state.h" | 19 #include "ash/wm/window_state.h" |
| 20 #include "ash/wm/window_state_aura.h" | |
| 21 #include "ui/aura/window.h" | 20 #include "ui/aura/window.h" |
| 22 #include "ui/aura/window_event_dispatcher.h" | 21 #include "ui/aura/window_event_dispatcher.h" |
| 23 #endif | 22 #endif |
| 24 | 23 |
| 25 using message_center::NotifierId; | 24 using message_center::NotifierId; |
| 26 | 25 |
| 27 namespace { | 26 namespace { |
| 28 | 27 |
| 29 bool DoesFullscreenModeBlockNotifications() { | 28 bool DoesFullscreenModeBlockNotifications() { |
| 30 #if defined(USE_ASH) | 29 #if defined(USE_ASH) |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 return enabled; | 90 return enabled; |
| 92 } | 91 } |
| 93 | 92 |
| 94 void FullscreenNotificationBlocker::Observe( | 93 void FullscreenNotificationBlocker::Observe( |
| 95 int type, | 94 int type, |
| 96 const content::NotificationSource& source, | 95 const content::NotificationSource& source, |
| 97 const content::NotificationDetails& details) { | 96 const content::NotificationDetails& details) { |
| 98 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); | 97 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); |
| 99 CheckState(); | 98 CheckState(); |
| 100 } | 99 } |
| OLD | NEW |