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

Side by Side Diff: ui/message_center/views/message_popup_collection.h

Issue 20598004: Do not hide the web notification popups by the system tray, rather let them avoid (2nd) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/web_notification/web_notification_tray_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 11 matching lines...) Expand all
22 22
23 namespace base { 23 namespace base {
24 class RunLoop; 24 class RunLoop;
25 } 25 }
26 26
27 namespace views { 27 namespace views {
28 class Widget; 28 class Widget;
29 } 29 }
30 30
31 namespace ash { 31 namespace ash {
32 class WebNotificationTrayTest;
32 FORWARD_DECLARE_TEST(WebNotificationTrayTest, ManyPopupNotifications); 33 FORWARD_DECLARE_TEST(WebNotificationTrayTest, ManyPopupNotifications);
33 } 34 }
34 35
35 namespace message_center { 36 namespace message_center {
36 namespace test { 37 namespace test {
37 class MessagePopupCollectionTest; 38 class MessagePopupCollectionTest;
38 class MessagePopupCollectionWidgetsTest; 39 class MessagePopupCollectionWidgetsTest;
39 } 40 }
40 41
41 class MessageCenter; 42 class MessageCenter;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // Overridden from gfx::DislayObserver: 103 // Overridden from gfx::DislayObserver:
103 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE; 104 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
104 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE; 105 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
105 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE; 106 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
106 107
107 private: 108 private:
108 FRIEND_TEST_ALL_PREFIXES(ash::WebNotificationTrayTest, 109 FRIEND_TEST_ALL_PREFIXES(ash::WebNotificationTrayTest,
109 ManyPopupNotifications); 110 ManyPopupNotifications);
110 friend class test::MessagePopupCollectionTest; 111 friend class test::MessagePopupCollectionTest;
111 friend class test::MessagePopupCollectionWidgetsTest; 112 friend class test::MessagePopupCollectionWidgetsTest;
113 friend class ash::WebNotificationTrayTest;
112 typedef std::list<ToastContentsView*> Toasts; 114 typedef std::list<ToastContentsView*> Toasts;
113 115
114 void CloseAllWidgets(); 116 void CloseAllWidgets();
115 117
116 // Returns the x-origin for the given toast bounds in the current work area. 118 // Returns the x-origin for the given toast bounds in the current work area.
117 int GetToastOriginX(const gfx::Rect& toast_bounds); 119 int GetToastOriginX(const gfx::Rect& toast_bounds);
118 120
119 // Iterates toasts and starts closing the expired ones. 121 // Iterates toasts and starts closing the expired ones.
120 void CloseToasts(); 122 void CloseToasts();
121 123
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 193
192 // True if the first item should not have spacing against the tray. 194 // True if the first item should not have spacing against the tray.
193 bool first_item_has_no_margin_; 195 bool first_item_has_no_margin_;
194 196
195 DISALLOW_COPY_AND_ASSIGN(MessagePopupCollection); 197 DISALLOW_COPY_AND_ASSIGN(MessagePopupCollection);
196 }; 198 };
197 199
198 } // namespace message_center 200 } // namespace message_center
199 201
200 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_ 202 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_POPUP_COLLECTION_H_
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698