| 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_NOTIFICATION_UI_MANAGER_MAC_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_MAC_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_MAC_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_MAC_H_ |
| 7 | 7 |
| 8 #import <AppKit/AppKit.h> | 8 #import <AppKit/AppKit.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/memory/scoped_nsobject.h" | 14 #include "base/mac/scoped_nsobject.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 17 #include "chrome/browser/notifications/balloon_notification_ui_manager.h" | 17 #include "chrome/browser/notifications/balloon_notification_ui_manager.h" |
| 18 | 18 |
| 19 @protocol CrUserNotification; | 19 @protocol CrUserNotification; |
| 20 class Notification; | 20 class Notification; |
| 21 @class NotificationCenterDelegate; | 21 @class NotificationCenterDelegate; |
| 22 class PrefService; | 22 class PrefService; |
| 23 class Profile; | 23 class Profile; |
| 24 | 24 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 // Erases a Cocoa notification from both the application and Notification | 68 // Erases a Cocoa notification from both the application and Notification |
| 69 // Center, and deletes the corresponding C++ object. | 69 // Center, and deletes the corresponding C++ object. |
| 70 bool RemoveNotification(id<CrUserNotification> notification); | 70 bool RemoveNotification(id<CrUserNotification> notification); |
| 71 | 71 |
| 72 // Finds a notification with a given replacement id. | 72 // Finds a notification with a given replacement id. |
| 73 id<CrUserNotification> FindNotificationWithReplacementId( | 73 id<CrUserNotification> FindNotificationWithReplacementId( |
| 74 const string16& replacement_id) const; | 74 const string16& replacement_id) const; |
| 75 | 75 |
| 76 // Cocoa class that receives callbacks from the NSUserNotificationCenter. | 76 // Cocoa class that receives callbacks from the NSUserNotificationCenter. |
| 77 scoped_nsobject<NotificationCenterDelegate> delegate_; | 77 base::scoped_nsobject<NotificationCenterDelegate> delegate_; |
| 78 | 78 |
| 79 // Maps notification_ids to ControllerNotifications. The map owns the value, | 79 // Maps notification_ids to ControllerNotifications. The map owns the value, |
| 80 // so it must be deleted when remvoed from the map. This is typically handled | 80 // so it must be deleted when remvoed from the map. This is typically handled |
| 81 // in RemoveNotification. | 81 // in RemoveNotification. |
| 82 NotificationMap notification_map_; | 82 NotificationMap notification_map_; |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(NotificationUIManagerMac); | 84 DISALLOW_COPY_AND_ASSIGN(NotificationUIManagerMac); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_MAC_H_ | 87 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_MAC_H_ |
| OLD | NEW |