OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ASH_SYSTEM_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 5 #ifndef ASH_SYSTEM_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
6 #define ASH_SYSTEM_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 6 #define ASH_SYSTEM_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/system/tray/tray_background_view.h" | 9 #include "ash/system/tray/tray_background_view.h" |
10 #include "ash/system/user/login_status.h" | 10 #include "ash/system/user/login_status.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // Request the Delegate to the settings dialog. | 136 // Request the Delegate to the settings dialog. |
137 void ShowSettings(const std::string& id); | 137 void ShowSettings(const std::string& id); |
138 | 138 |
139 // Called when a notification is clicked on. Event is passed to the Delegate. | 139 // Called when a notification is clicked on. Event is passed to the Delegate. |
140 void OnClicked(const std::string& id); | 140 void OnClicked(const std::string& id); |
141 | 141 |
142 private: | 142 private: |
143 class Bubble; | 143 class Bubble; |
144 friend class internal::WebNotificationButtonView; | 144 friend class internal::WebNotificationButtonView; |
145 friend class internal::WebNotificationMenuModel; | 145 friend class internal::WebNotificationMenuModel; |
| 146 friend class internal::WebNotificationList; |
146 friend class internal::WebNotificationView; | 147 friend class internal::WebNotificationView; |
147 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); | 148 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); |
148 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationBubble); | 149 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationBubble); |
149 | 150 |
150 int GetNotificationCount() const; | 151 int GetNotificationCount() const; |
151 void UpdateTray(); | 152 void UpdateTray(); |
152 void UpdateTrayAndBubble(); | 153 void UpdateTrayAndBubble(); |
153 void HideBubble(Bubble* bubble); | 154 void HideBubble(Bubble* bubble); |
154 bool HasNotificationForTest(const std::string& id) const; | 155 bool HasNotificationForTest(const std::string& id) const; |
155 | 156 |
156 const internal::WebNotificationList* notification_list() const { | 157 const internal::WebNotificationList* notification_list() const { |
157 return notification_list_.get(); | 158 return notification_list_.get(); |
158 } | 159 } |
159 Bubble* message_center_bubble() const { return message_center_bubble_.get(); } | 160 Bubble* message_center_bubble() const { return message_center_bubble_.get(); } |
160 Bubble* notification_bubble() const { return notification_bubble_.get(); } | 161 Bubble* notification_bubble() const { return notification_bubble_.get(); } |
161 | 162 |
162 scoped_ptr<internal::WebNotificationList> notification_list_; | 163 scoped_ptr<internal::WebNotificationList> notification_list_; |
163 scoped_ptr<Bubble> message_center_bubble_; | 164 scoped_ptr<Bubble> message_center_bubble_; |
164 scoped_ptr<Bubble> notification_bubble_; | 165 scoped_ptr<Bubble> notification_bubble_; |
165 views::Label* count_label_; | 166 views::Label* count_label_; |
166 Delegate* delegate_; | 167 Delegate* delegate_; |
167 bool show_message_center_on_unlock_; | 168 bool show_message_center_on_unlock_; |
168 | 169 |
169 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); | 170 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); |
170 }; | 171 }; |
171 | 172 |
172 } // namespace ash | 173 } // namespace ash |
173 | 174 |
174 #endif // ASH_SYSTEM_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ | 175 #endif // ASH_SYSTEM_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ |
OLD | NEW |