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

Unified Diff: chrome/browser/notifications/notification_ui_manager.h

Issue 6359008: Do not show notifications when in fullscreen or screensaver mode.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/notifications/notification_ui_manager.h
===================================================================
--- chrome/browser/notifications/notification_ui_manager.h (revision 72388)
+++ chrome/browser/notifications/notification_ui_manager.h (working copy)
@@ -11,6 +11,7 @@
#include "base/id_map.h"
#include "base/scoped_ptr.h"
+#include "base/timer.h"
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/notifications/balloon_collection.h"
#include "chrome/browser/prefs/pref_member.h"
@@ -93,6 +94,9 @@
// returns true if the replacement happened.
bool TryReplacement(const Notification& notification);
+ // Checks the user state to decide if we want to show the notification.
+ void CheckUserState();
+
// An owned pointer to the collection of active balloons.
scoped_ptr<BalloonCollection> balloon_collection_;
@@ -106,6 +110,10 @@
// Prefs listener for the position preference.
IntegerPrefMember position_pref_;
+ // Used by screen-saver and full-screen handling support.
+ bool is_user_active_;
+ base::RepeatingTimer<NotificationUIManager> user_state_check_timer_;
+
DISALLOW_COPY_AND_ASSIGN(NotificationUIManager);
};

Powered by Google App Engine
This is Rietveld 408576698