| 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> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 BalloonCollection::PositionPreference GetPositionPreference(); | 76 BalloonCollection::PositionPreference GetPositionPreference(); |
| 77 | 77 |
| 78 // Sets the preference that indicates where notifications should | 78 // Sets the preference that indicates where notifications should |
| 79 // be placed on the screen. | 79 // be placed on the screen. |
| 80 void SetPositionPreference(BalloonCollection::PositionPreference preference); | 80 void SetPositionPreference(BalloonCollection::PositionPreference preference); |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 explicit NotificationUIManager(PrefService* local_state); | 83 explicit NotificationUIManager(PrefService* local_state); |
| 84 | 84 |
| 85 // NotificationObserver override. | 85 // NotificationObserver override. |
| 86 virtual void Observe(NotificationType type, | 86 virtual void Observe(int type, |
| 87 const NotificationSource& source, | 87 const NotificationSource& source, |
| 88 const NotificationDetails& details); | 88 const NotificationDetails& details); |
| 89 | 89 |
| 90 // Attempts to display notifications from the show_queue if the user | 90 // Attempts to display notifications from the show_queue if the user |
| 91 // is active. | 91 // is active. |
| 92 void CheckAndShowNotifications(); | 92 void CheckAndShowNotifications(); |
| 93 | 93 |
| 94 // Attempts to display notifications from the show_queue. | 94 // Attempts to display notifications from the show_queue. |
| 95 void ShowNotifications(); | 95 void ShowNotifications(); |
| 96 | 96 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 118 IntegerPrefMember position_pref_; | 118 IntegerPrefMember position_pref_; |
| 119 | 119 |
| 120 // Used by screen-saver and full-screen handling support. | 120 // Used by screen-saver and full-screen handling support. |
| 121 bool is_user_active_; | 121 bool is_user_active_; |
| 122 base::RepeatingTimer<NotificationUIManager> user_state_check_timer_; | 122 base::RepeatingTimer<NotificationUIManager> user_state_check_timer_; |
| 123 | 123 |
| 124 DISALLOW_COPY_AND_ASSIGN(NotificationUIManager); | 124 DISALLOW_COPY_AND_ASSIGN(NotificationUIManager); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ | 127 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ |
| OLD | NEW |