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

Unified Diff: chrome/browser/chromeos/notifications/system_notification.h

Issue 10382118: Don't show system notifications while the screen is locked. (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: Rebase Created 8 years, 7 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/chromeos/notifications/system_notification.h
diff --git a/chrome/browser/chromeos/notifications/system_notification.h b/chrome/browser/chromeos/notifications/system_notification.h
index ff9275a0e3bd631d7500474290d80accde345302..aacca0d649893552a1f1f13bd08c4c33490be5b0 100644
--- a/chrome/browser/chromeos/notifications/system_notification.h
+++ b/chrome/browser/chromeos/notifications/system_notification.h
@@ -13,8 +13,10 @@
#include "base/string16.h"
#include "chrome/browser/chromeos/notifications/balloon_view_host_chromeos.h" // MessageCallback
#include "chrome/browser/notifications/notification_delegate.h"
+#include "chromeos/dbus/power_manager_client.h"
#include "googleurl/src/gurl.h"
+class Notification;
class Profile;
namespace chromeos {
@@ -24,7 +26,7 @@ typedef class BalloonCollectionImplAura BalloonCollectionImplType;
// The system notification object handles the display of a system notification
-class SystemNotification {
+class SystemNotification : public PowerManagerClient::Observer {
public:
// The profile is the current user profile. The id is any string used
// to uniquely identify this notification. The title is the title of
@@ -42,6 +44,9 @@ class SystemNotification {
virtual ~SystemNotification();
+ // PowerManagerClient::Observer override.
+ virtual void UnlockScreen() OVERRIDE;
+
void set_title(const string16& title) { title_ = title; }
// Show will show or update the message for this notification
@@ -82,14 +87,20 @@ class SystemNotification {
};
void Init(int icon_resource_id);
+ void ShowNotification(const Notification& notify);
Profile* profile_;
BalloonCollectionImplType* collection_;
scoped_refptr<NotificationDelegate> delegate_;
+ string16 message_;
+ string16 link_;
+ BalloonViewHost::MessageCallback callback_;
GURL icon_;
string16 title_;
bool visible_;
+ bool sticky_;
bool urgent_;
+ bool show_on_unlock_;
DISALLOW_COPY_AND_ASSIGN(SystemNotification);
};

Powered by Google App Engine
This is Rietveld 408576698