| 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 <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 Profile* profile) OVERRIDE; | 38 Profile* profile) OVERRIDE; |
| 39 virtual bool UpdateNotification(const Notification& notification, | 39 virtual bool UpdateNotification(const Notification& notification, |
| 40 Profile* profile) OVERRIDE; | 40 Profile* profile) OVERRIDE; |
| 41 | 41 |
| 42 // MessageCenter::Delegate | 42 // MessageCenter::Delegate |
| 43 virtual void NotificationRemoved(const std::string& notification_id) OVERRIDE; | 43 virtual void NotificationRemoved(const std::string& notification_id) OVERRIDE; |
| 44 virtual void DisableExtension(const std::string& notification_id) OVERRIDE; | 44 virtual void DisableExtension(const std::string& notification_id) OVERRIDE; |
| 45 virtual void DisableNotificationsFromSource( | 45 virtual void DisableNotificationsFromSource( |
| 46 const std::string& notification_id) OVERRIDE; | 46 const std::string& notification_id) OVERRIDE; |
| 47 virtual void ShowSettings(const std::string& notification_id) OVERRIDE; | 47 virtual void ShowSettings(const std::string& notification_id) OVERRIDE; |
| 48 virtual void ShowSettingsDialog(gfx::NativeView context) OVERRIDE; |
| 48 virtual void OnClicked(const std::string& notification_id) OVERRIDE; | 49 virtual void OnClicked(const std::string& notification_id) OVERRIDE; |
| 49 virtual void OnButtonClicked(const std::string& notification_id, | 50 virtual void OnButtonClicked(const std::string& notification_id, |
| 50 int button_index) OVERRIDE; | 51 int button_index) OVERRIDE; |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 message_center::MessageCenter* message_center_; // Weak, global. | 54 message_center::MessageCenter* message_center_; // Weak, global. |
| 54 | 55 |
| 55 // This class keeps a set of original Notification objects and corresponding | 56 // This class keeps a set of original Notification objects and corresponding |
| 56 // Profiles, so when MessageCenter calls back with a notification_id, this | 57 // Profiles, so when MessageCenter calls back with a notification_id, this |
| 57 // class has necessary mapping to other source info - for example, it calls | 58 // class has necessary mapping to other source info - for example, it calls |
| (...skipping 28 matching lines...) Expand all Loading... |
| 86 | 87 |
| 87 // Helpers that add/remove the notification from local map and MessageCenter. | 88 // Helpers that add/remove the notification from local map and MessageCenter. |
| 88 // They take ownership of profile_notification object. | 89 // They take ownership of profile_notification object. |
| 89 void AddProfileNotification(ProfileNotification* profile_notification); | 90 void AddProfileNotification(ProfileNotification* profile_notification); |
| 90 void RemoveProfileNotification(ProfileNotification* profile_notification); | 91 void RemoveProfileNotification(ProfileNotification* profile_notification); |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager); | 93 DISALLOW_COPY_AND_ASSIGN(MessageCenterNotificationManager); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ | 96 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_NOTIFICATION_MANAGER_H_ |
| 96 | |
| 97 | |
| OLD | NEW |