| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_ | 5 #ifndef UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_ |
| 6 #define UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_ | 6 #define UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 scoped_nsobject<NSTextField> title_; | 44 scoped_nsobject<NSTextField> title_; |
| 45 | 45 |
| 46 // Body text of the message. | 46 // Body text of the message. |
| 47 scoped_nsobject<NSTextField> message_; | 47 scoped_nsobject<NSTextField> message_; |
| 48 } | 48 } |
| 49 | 49 |
| 50 // Creates a new controller for a given notification. | 50 // Creates a new controller for a given notification. |
| 51 - (id)initWithNotification:(const message_center::Notification*)notification | 51 - (id)initWithNotification:(const message_center::Notification*)notification |
| 52 messageCenter:(message_center::MessageCenter*)messageCenter; | 52 messageCenter:(message_center::MessageCenter*)messageCenter; |
| 53 | 53 |
| 54 // If the model object changes, this method will update the views to reflect |
| 55 // the new model object. Returns the updated frame of the notification. |
| 56 - (NSRect)updateNotification:(const message_center::Notification*)notification; |
| 57 |
| 54 // Action for clicking on the notification's |closeButton_|. | 58 // Action for clicking on the notification's |closeButton_|. |
| 55 - (void)close:(id)sender; | 59 - (void)close:(id)sender; |
| 56 | 60 |
| 57 // Accessor for the notification. | 61 // Accessor for the notification. |
| 58 - (const message_center::Notification*)notification; | 62 - (const message_center::Notification*)notification; |
| 59 | 63 |
| 60 // Gets the notification ID. This string is owned by the NotificationController | 64 // Gets the notification ID. This string is owned by the NotificationController |
| 61 // rather than the model object, so it's safe to use after the Notification has | 65 // rather than the model object, so it's safe to use after the Notification has |
| 62 // been deleted. | 66 // been deleted. |
| 63 - (const std::string&)notificationID; | 67 - (const std::string&)notificationID; |
| 64 | 68 |
| 65 @end | 69 @end |
| 66 | 70 |
| 67 #endif // UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_ | 71 #endif // UI_MESSAGE_CENTER_COCOA_NOTIFICATION_CONTROLLER_H_ |
| OLD | NEW |