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 #ifndef CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/prefs/pref_member.h" | 9 #include "base/prefs/pref_member.h" |
10 #include "chrome/browser/status_icons/status_icon_menu_model.h" | 10 #include "chrome/browser/status_icons/status_icon_menu_model.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 public StatusIconObserver, | 49 public StatusIconObserver, |
50 public base::SupportsWeakPtr<WebNotificationTray>, | 50 public base::SupportsWeakPtr<WebNotificationTray>, |
51 public StatusIconMenuModel::Delegate { | 51 public StatusIconMenuModel::Delegate { |
52 public: | 52 public: |
53 explicit WebNotificationTray(PrefService* local_state); | 53 explicit WebNotificationTray(PrefService* local_state); |
54 virtual ~WebNotificationTray(); | 54 virtual ~WebNotificationTray(); |
55 | 55 |
56 message_center::MessageCenter* message_center(); | 56 message_center::MessageCenter* message_center(); |
57 | 57 |
58 // MessageCenterTrayDelegate implementation. | 58 // MessageCenterTrayDelegate implementation. |
59 virtual bool ShowPopups() OVERRIDE; | 59 virtual bool ShowPopups() override; |
60 virtual void HidePopups() OVERRIDE; | 60 virtual void HidePopups() override; |
61 virtual bool ShowMessageCenter() OVERRIDE; | 61 virtual bool ShowMessageCenter() override; |
62 virtual void HideMessageCenter() OVERRIDE; | 62 virtual void HideMessageCenter() override; |
63 virtual void OnMessageCenterTrayChanged() OVERRIDE; | 63 virtual void OnMessageCenterTrayChanged() override; |
64 virtual bool ShowNotifierSettings() OVERRIDE; | 64 virtual bool ShowNotifierSettings() override; |
65 virtual bool IsContextMenuEnabled() const OVERRIDE; | 65 virtual bool IsContextMenuEnabled() const override; |
66 | 66 |
67 // StatusIconObserver implementation. | 67 // StatusIconObserver implementation. |
68 virtual void OnStatusIconClicked() OVERRIDE; | 68 virtual void OnStatusIconClicked() override; |
69 #if defined(OS_WIN) | 69 #if defined(OS_WIN) |
70 virtual void OnBalloonClicked() OVERRIDE; | 70 virtual void OnBalloonClicked() override; |
71 | 71 |
72 // This shows a platform-specific balloon informing the user of the existence | 72 // This shows a platform-specific balloon informing the user of the existence |
73 // of the message center in the status tray area. | 73 // of the message center in the status tray area. |
74 void DisplayFirstRunBalloon(); | 74 void DisplayFirstRunBalloon(); |
75 | 75 |
76 void EnforceStatusIconVisible(); | 76 void EnforceStatusIconVisible(); |
77 #endif | 77 #endif |
78 | 78 |
79 // StatusIconMenuModel::Delegate implementation. | 79 // StatusIconMenuModel::Delegate implementation. |
80 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 80 virtual void ExecuteCommand(int command_id, int event_flags) override; |
81 | 81 |
82 // Changes the icon and hovertext based on number of unread notifications. | 82 // Changes the icon and hovertext based on number of unread notifications. |
83 void UpdateStatusIcon(); | 83 void UpdateStatusIcon(); |
84 void SendHideMessageCenter(); | 84 void SendHideMessageCenter(); |
85 void MarkMessageCenterHidden(); | 85 void MarkMessageCenterHidden(); |
86 | 86 |
87 // Gets the point where the status icon was clicked. | 87 // Gets the point where the status icon was clicked. |
88 gfx::Point mouse_click_point() { return mouse_click_point_; } | 88 gfx::Point mouse_click_point() { return mouse_click_point_; } |
89 virtual MessageCenterTray* GetMessageCenterTray() OVERRIDE; | 89 virtual MessageCenterTray* GetMessageCenterTray() override; |
90 | 90 |
91 private: | 91 private: |
92 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); | 92 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); |
93 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble); | 93 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble); |
94 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, | 94 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, |
95 ManyMessageCenterNotifications); | 95 ManyMessageCenterNotifications); |
96 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications); | 96 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications); |
97 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManuallyCloseMessageCenter); | 97 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManuallyCloseMessageCenter); |
98 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, StatusIconBehavior); | 98 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, StatusIconBehavior); |
99 | 99 |
(...skipping 24 matching lines...) Expand all Loading... |
124 bool should_update_tray_content_; | 124 bool should_update_tray_content_; |
125 bool last_quiet_mode_state_; | 125 bool last_quiet_mode_state_; |
126 base::string16 title_; | 126 base::string16 title_; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); | 128 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace message_center | 131 } // namespace message_center |
132 | 132 |
133 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ | 133 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ |
OLD | NEW |