OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 ProfileID profile_id) const override; | 53 ProfileID profile_id) const override; |
54 bool CancelById(const std::string& delegate_id, | 54 bool CancelById(const std::string& delegate_id, |
55 ProfileID profile_id) override; | 55 ProfileID profile_id) override; |
56 std::set<std::string> GetAllIdsByProfileAndSourceOrigin( | 56 std::set<std::string> GetAllIdsByProfileAndSourceOrigin( |
57 ProfileID profile_id, | 57 ProfileID profile_id, |
58 const GURL& source) override; | 58 const GURL& source) override; |
59 std::set<std::string> GetAllIdsByProfile(ProfileID profile_id) override; | 59 std::set<std::string> GetAllIdsByProfile(ProfileID profile_id) override; |
60 bool CancelAllBySourceOrigin(const GURL& source_origin) override; | 60 bool CancelAllBySourceOrigin(const GURL& source_origin) override; |
61 bool CancelAllByProfile(ProfileID profile_id) override; | 61 bool CancelAllByProfile(ProfileID profile_id) override; |
62 void CancelAll() override; | 62 void CancelAll() override; |
| 63 void StartShutdown() override; |
63 | 64 |
64 // MessageCenterObserver | 65 // MessageCenterObserver |
65 void OnNotificationRemoved(const std::string& notification_id, | 66 void OnNotificationRemoved(const std::string& notification_id, |
66 bool by_user) override; | 67 bool by_user) override; |
67 void OnCenterVisibilityChanged(message_center::Visibility) override; | 68 void OnCenterVisibilityChanged(message_center::Visibility) override; |
68 void OnNotificationUpdated(const std::string& notification_id) override; | 69 void OnNotificationUpdated(const std::string& notification_id) override; |
69 | 70 |
70 void EnsureMessageCenterClosed(); | 71 void EnsureMessageCenterClosed(); |
71 | 72 |
72 // Takes ownership of |delegate|. | 73 // Takes ownership of |delegate|. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 std::vector<std::unique_ptr<message_center::NotificationBlocker>> blockers_; | 106 std::vector<std::unique_ptr<message_center::NotificationBlocker>> blockers_; |
106 | 107 |
107 NotificationSystemObserver system_observer_; | 108 NotificationSystemObserver system_observer_; |
108 | 109 |
109 // Keeps track of all notification statistics for UMA purposes. | 110 // Keeps track of all notification statistics for UMA purposes. |
110 MessageCenterStatsCollector stats_collector_; | 111 MessageCenterStatsCollector stats_collector_; |
111 | 112 |
112 // Keeps track of notifications specific to Google Now for UMA purposes. | 113 // Keeps track of notifications specific to Google Now for UMA purposes. |
113 GoogleNowNotificationStatsCollector google_now_stats_collector_; | 114 GoogleNowNotificationStatsCollector google_now_stats_collector_; |
114 | 115 |
| 116 // Tracks if shutdown has started. |
| 117 bool is_shutdown_started_ = false; |
| 118 |
115 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager); | 119 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager); |
116 }; | 120 }; |
117 | 121 |
118 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ | 122 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ |
OLD | NEW |