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

Unified Diff: chrome/browser/ui/views/message_center/web_notification_tray.h

Issue 252513004: Reland r265807: "Moves the notification icon out of th..." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable tray size test on Vista since it won't have any effect on a new icon. Created 6 years, 8 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/ui/views/message_center/web_notification_tray.h
diff --git a/chrome/browser/ui/views/message_center/web_notification_tray.h b/chrome/browser/ui/views/message_center/web_notification_tray.h
index 24dfe5280e55ca31c236abbe6e74ced8ea9e5acb..9ff2492d8bee8a9cd6a98ac1a43d2159cef5af1b 100644
--- a/chrome/browser/ui/views/message_center/web_notification_tray.h
+++ b/chrome/browser/ui/views/message_center/web_notification_tray.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_
#include "base/memory/weak_ptr.h"
+#include "base/prefs/pref_member.h"
#include "chrome/browser/status_icons/status_icon_menu_model.h"
#include "chrome/browser/status_icons/status_icon_observer.h"
#include "chrome/browser/ui/views/message_center/message_center_widget_delegate.h"
@@ -17,6 +18,11 @@
#include "ui/message_center/message_center_tray_delegate.h"
#include "ui/views/widget/widget_observer.h"
+#if defined(OS_WIN)
+#include "base/threading/thread.h"
+#endif
+
+class PrefService;
class StatusIcon;
namespace message_center {
@@ -43,7 +49,7 @@ class WebNotificationTray : public message_center::MessageCenterTrayDelegate,
public base::SupportsWeakPtr<WebNotificationTray>,
public StatusIconMenuModel::Delegate {
public:
- WebNotificationTray();
+ explicit WebNotificationTray(PrefService* local_state);
virtual ~WebNotificationTray();
message_center::MessageCenter* message_center();
@@ -65,6 +71,8 @@ class WebNotificationTray : public message_center::MessageCenterTrayDelegate,
// This shows a platform-specific balloon informing the user of the existence
// of the message center in the status tray area.
void DisplayFirstRunBalloon();
+
+ void EnforceStatusIconVisible();
#endif
// StatusIconMenuModel::Delegate implementation.
@@ -95,6 +103,13 @@ class WebNotificationTray : public message_center::MessageCenterTrayDelegate,
void AddQuietModeMenu(StatusIcon* status_icon);
MessageCenterWidgetDelegate* GetMessageCenterWidgetDelegateForTest();
+#if defined(OS_WIN)
+ // This member variable keeps track of whether EnforceStatusIconVisible has
+ // been invoked on this machine, so the user still has control after we try
+ // promoting it the first time.
+ scoped_ptr<BooleanPrefMember> did_force_tray_visible_;
+#endif
+
MessageCenterWidgetDelegate* message_center_delegate_;
scoped_ptr<message_center::MessagePopupCollection> popup_collection_;

Powered by Google App Engine
This is Rietveld 408576698