OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_UI_COCOA_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_ |
6 #define CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 | 11 |
12 @class NSUserNotification; | 12 @class NSUserNotification; |
13 | 13 |
14 namespace notification_builder { | |
15 | |
16 extern NSString* const kNotificationOrigin; | |
17 extern NSString* const kNotificationId; | |
18 extern NSString* const kNotificationProfileId; | |
19 extern NSString* const kNotificationIncognito; | |
20 | |
21 } // notification_builder | |
22 | |
23 // Provides a marshallable way for storing the information required to construct | 14 // Provides a marshallable way for storing the information required to construct |
24 // a NSUSerNotification that is to be displayed on the system. | 15 // a NSUSerNotification that is to be displayed on the system. |
25 // | 16 // |
26 // A quick example: | 17 // A quick example: |
27 // base::scoped_nsobject<NotificationBuilder> builder( | 18 // base::scoped_nsobject<NotificationBuilder> builder( |
28 // [[NotificationBuilder alloc] init]); | 19 // [[NotificationBuilder alloc] init]); |
29 // [builder setTitle:@"Hello"]; | 20 // [builder setTitle:@"Hello"]; |
30 // | 21 // |
31 // // Build a notification out of the data. | 22 // // Build a notification out of the data. |
32 // NSUserNotification* notification = | 23 // NSUserNotification* notification = |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 - (NSUserNotification*)buildUserNotification; | 60 - (NSUserNotification*)buildUserNotification; |
70 | 61 |
71 // Returns a representation of a notification that can be serialized. | 62 // Returns a representation of a notification that can be serialized. |
72 // Another instance of NotificationBuilder can read this directly and generate | 63 // Another instance of NotificationBuilder can read this directly and generate |
73 // a notification out of it via the |buildbuildUserNotification| method. | 64 // a notification out of it via the |buildbuildUserNotification| method. |
74 - (NSDictionary*)buildDictionary; | 65 - (NSDictionary*)buildDictionary; |
75 | 66 |
76 @end | 67 @end |
77 | 68 |
78 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_ | 69 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_NOTIFICATION_BUILDER_MAC_H_ |
OLD | NEW |