OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 return balloon_collection_.get(); | 66 return balloon_collection_.get(); |
67 } | 67 } |
68 | 68 |
69 // Gets the preference indicating where notifications should be placed. | 69 // Gets the preference indicating where notifications should be placed. |
70 BalloonCollection::PositionPreference GetPositionPreference(); | 70 BalloonCollection::PositionPreference GetPositionPreference(); |
71 | 71 |
72 // Sets the preference that indicates where notifications should | 72 // Sets the preference that indicates where notifications should |
73 // be placed on the screen. | 73 // be placed on the screen. |
74 void SetPositionPreference(BalloonCollection::PositionPreference preference); | 74 void SetPositionPreference(BalloonCollection::PositionPreference preference); |
75 | 75 |
76 // NotificationObserver interface (the event signaling kind of notifications) | 76 private: |
| 77 // NotificationObserver override. |
77 virtual void Observe(NotificationType type, | 78 virtual void Observe(NotificationType type, |
78 const NotificationSource& source, | 79 const NotificationSource& source, |
79 const NotificationDetails& details); | 80 const NotificationDetails& details); |
80 | 81 |
81 private: | |
82 // Attempts to display notifications from the show_queue if the user | 82 // Attempts to display notifications from the show_queue if the user |
83 // is active. | 83 // is active. |
84 void CheckAndShowNotifications(); | 84 void CheckAndShowNotifications(); |
85 | 85 |
86 // Attempts to display notifications from the show_queue. | 86 // Attempts to display notifications from the show_queue. |
87 void ShowNotifications(); | 87 void ShowNotifications(); |
88 | 88 |
89 // BalloonCollectionObserver implementation. | 89 // BalloonCollectionObserver implementation. |
90 virtual void OnBalloonSpaceChanged(); | 90 virtual void OnBalloonSpaceChanged(); |
91 | 91 |
(...skipping 11 matching lines...) Expand all Loading... |
103 // Registrar for the other kind of notifications (event signaling). | 103 // Registrar for the other kind of notifications (event signaling). |
104 NotificationRegistrar registrar_; | 104 NotificationRegistrar registrar_; |
105 | 105 |
106 // Prefs listener for the position preference. | 106 // Prefs listener for the position preference. |
107 IntegerPrefMember position_pref_; | 107 IntegerPrefMember position_pref_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(NotificationUIManager); | 109 DISALLOW_COPY_AND_ASSIGN(NotificationUIManager); |
110 }; | 110 }; |
111 | 111 |
112 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ | 112 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ |
OLD | NEW |