OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ |
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 } | 29 } |
30 | 30 |
31 namespace ash { | 31 namespace ash { |
32 class WebNotificationTrayTest; | 32 class WebNotificationTrayTest; |
33 FORWARD_DECLARE_TEST(WebNotificationTrayTest, ManyPopupNotifications); | 33 FORWARD_DECLARE_TEST(WebNotificationTrayTest, ManyPopupNotifications); |
34 } | 34 } |
35 | 35 |
36 namespace message_center { | 36 namespace message_center { |
37 namespace test { | 37 namespace test { |
38 class MessagePopupCollectionTest; | 38 class MessagePopupCollectionTest; |
39 class MessagePopupCollectionWidgetsTest; | |
40 } | 39 } |
41 | 40 |
42 class MessageCenter; | 41 class MessageCenter; |
43 class MessageCenterTray; | 42 class MessageCenterTray; |
44 class ToastContentsView; | 43 class ToastContentsView; |
45 | 44 |
46 enum PopupAlignment { | 45 enum PopupAlignment { |
47 POPUP_ALIGNMENT_TOP = 1 << 0, | 46 POPUP_ALIGNMENT_TOP = 1 << 0, |
48 POPUP_ALIGNMENT_LEFT = 1 << 1, | 47 POPUP_ALIGNMENT_LEFT = 1 << 1, |
49 POPUP_ALIGNMENT_BOTTOM = 1 << 2, | 48 POPUP_ALIGNMENT_BOTTOM = 1 << 2, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 101 |
103 // Overridden from gfx::DislayObserver: | 102 // Overridden from gfx::DislayObserver: |
104 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE; | 103 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE; |
105 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE; | 104 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE; |
106 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE; | 105 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE; |
107 | 106 |
108 private: | 107 private: |
109 FRIEND_TEST_ALL_PREFIXES(ash::WebNotificationTrayTest, | 108 FRIEND_TEST_ALL_PREFIXES(ash::WebNotificationTrayTest, |
110 ManyPopupNotifications); | 109 ManyPopupNotifications); |
111 friend class test::MessagePopupCollectionTest; | 110 friend class test::MessagePopupCollectionTest; |
112 friend class test::MessagePopupCollectionWidgetsTest; | |
113 friend class ash::WebNotificationTrayTest; | 111 friend class ash::WebNotificationTrayTest; |
114 typedef std::list<ToastContentsView*> Toasts; | 112 typedef std::list<ToastContentsView*> Toasts; |
115 | 113 |
116 void CloseAllWidgets(); | 114 void CloseAllWidgets(); |
117 | 115 |
118 // Returns the x-origin for the given toast bounds in the current work area. | 116 // Returns the x-origin for the given toast bounds in the current work area. |
119 int GetToastOriginX(const gfx::Rect& toast_bounds); | 117 int GetToastOriginX(const gfx::Rect& toast_bounds); |
120 | 118 |
121 // Iterates toasts and starts closing the expired ones. | 119 // Iterates toasts and starts closing the expired ones. |
122 void CloseToasts(); | 120 void CloseToasts(); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 191 |
194 // True if the first item should not have spacing against the tray. | 192 // True if the first item should not have spacing against the tray. |
195 bool first_item_has_no_margin_; | 193 bool first_item_has_no_margin_; |
196 | 194 |
197 DISALLOW_COPY_AND_ASSIGN(MessagePopupCollection); | 195 DISALLOW_COPY_AND_ASSIGN(MessagePopupCollection); |
198 }; | 196 }; |
199 | 197 |
200 } // namespace message_center | 198 } // namespace message_center |
201 | 199 |
202 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ | 200 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ |
OLD | NEW |