| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 ProfileID profile_id) const override; | 52 ProfileID profile_id) const override; |
| 53 bool CancelById(const std::string& delegate_id, | 53 bool CancelById(const std::string& delegate_id, |
| 54 ProfileID profile_id) override; | 54 ProfileID profile_id) override; |
| 55 std::set<std::string> GetAllIdsByProfileAndSourceOrigin( | 55 std::set<std::string> GetAllIdsByProfileAndSourceOrigin( |
| 56 ProfileID profile_id, | 56 ProfileID profile_id, |
| 57 const GURL& source) override; | 57 const GURL& source) override; |
| 58 std::set<std::string> GetAllIdsByProfile(ProfileID profile_id) override; | 58 std::set<std::string> GetAllIdsByProfile(ProfileID profile_id) override; |
| 59 bool CancelAllBySourceOrigin(const GURL& source_origin) override; | 59 bool CancelAllBySourceOrigin(const GURL& source_origin) override; |
| 60 bool CancelAllByProfile(ProfileID profile_id) override; | 60 bool CancelAllByProfile(ProfileID profile_id) override; |
| 61 void CancelAll() override; | 61 void CancelAll() override; |
| 62 void StartShutdown() override; |
| 62 | 63 |
| 63 // MessageCenterObserver | 64 // MessageCenterObserver |
| 64 void OnNotificationRemoved(const std::string& notification_id, | 65 void OnNotificationRemoved(const std::string& notification_id, |
| 65 bool by_user) override; | 66 bool by_user) override; |
| 66 void OnCenterVisibilityChanged(message_center::Visibility) override; | 67 void OnCenterVisibilityChanged(message_center::Visibility) override; |
| 67 void OnNotificationUpdated(const std::string& notification_id) override; | 68 void OnNotificationUpdated(const std::string& notification_id) override; |
| 68 | 69 |
| 69 void EnsureMessageCenterClosed(); | 70 void EnsureMessageCenterClosed(); |
| 70 | 71 |
| 71 // Takes ownership of |delegate|. | 72 // Takes ownership of |delegate|. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 101 std::unique_ptr<message_center::NotifierSettingsProvider> settings_provider_; | 102 std::unique_ptr<message_center::NotifierSettingsProvider> settings_provider_; |
| 102 | 103 |
| 103 // To own the blockers. | 104 // To own the blockers. |
| 104 std::vector<std::unique_ptr<message_center::NotificationBlocker>> blockers_; | 105 std::vector<std::unique_ptr<message_center::NotificationBlocker>> blockers_; |
| 105 | 106 |
| 106 NotificationSystemObserver system_observer_; | 107 NotificationSystemObserver system_observer_; |
| 107 | 108 |
| 108 // Keeps track of all notification statistics for UMA purposes. | 109 // Keeps track of all notification statistics for UMA purposes. |
| 109 MessageCenterStatsCollector stats_collector_; | 110 MessageCenterStatsCollector stats_collector_; |
| 110 | 111 |
| 112 // Tracks if shutdown has started. |
| 113 bool is_shutdown_started_ = false; |
| 114 |
| 111 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager); | 115 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager); |
| 112 }; | 116 }; |
| 113 | 117 |
| 114 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ | 118 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ |
| OLD | NEW |