OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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> |
| 11 #include <vector> |
11 | 12 |
12 #include "base/id_map.h" | 13 #include "base/id_map.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/timer.h" | 15 #include "base/timer.h" |
15 #include "chrome/browser/notifications/balloon.h" | 16 #include "chrome/browser/notifications/balloon.h" |
16 #include "chrome/browser/notifications/balloon_collection.h" | 17 #include "chrome/browser/notifications/balloon_collection.h" |
17 #include "chrome/browser/prefs/pref_member.h" | 18 #include "chrome/browser/prefs/pref_member.h" |
18 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
19 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
20 | 21 |
21 class Notification; | 22 class Notification; |
22 class PrefService; | 23 class PrefService; |
23 class Profile; | 24 class Profile; |
24 class QueuedNotification; | 25 class QueuedNotification; |
25 class SiteInstance; | |
26 | 26 |
27 // The notification manager manages use of the desktop for notifications. | 27 // The notification manager manages use of the desktop for notifications. |
28 // It maintains a queue of pending notifications when space becomes constrained. | 28 // It maintains a queue of pending notifications when space becomes constrained. |
29 class NotificationUIManager | 29 class NotificationUIManager |
30 : public BalloonCollection::BalloonSpaceChangeListener, | 30 : public BalloonCollection::BalloonSpaceChangeListener, |
31 public content::NotificationObserver { | 31 public content::NotificationObserver { |
32 public: | 32 public: |
33 virtual ~NotificationUIManager(); | 33 virtual ~NotificationUIManager(); |
34 | 34 |
35 // Creates an initialized UI manager with a new balloon collection | 35 // Creates an initialized UI manager with a new balloon collection |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 IntegerPrefMember position_pref_; | 123 IntegerPrefMember position_pref_; |
124 | 124 |
125 // Used by screen-saver and full-screen handling support. | 125 // Used by screen-saver and full-screen handling support. |
126 bool is_user_active_; | 126 bool is_user_active_; |
127 base::RepeatingTimer<NotificationUIManager> user_state_check_timer_; | 127 base::RepeatingTimer<NotificationUIManager> user_state_check_timer_; |
128 | 128 |
129 DISALLOW_COPY_AND_ASSIGN(NotificationUIManager); | 129 DISALLOW_COPY_AND_ASSIGN(NotificationUIManager); |
130 }; | 130 }; |
131 | 131 |
132 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ | 132 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ |
OLD | NEW |