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 #import "chrome/browser/ui/cocoa/notifications/notification_response_builder_mac
.h" | 5 #import "chrome/browser/ui/cocoa/notifications/notification_response_builder_mac
.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/ui/cocoa/notifications/notification_constants_mac.h" | 8 #include "chrome/browser/ui/cocoa/notifications/notification_constants_mac.h" |
9 | 9 |
10 namespace { | 10 namespace { |
11 | 11 |
12 // Make sure this Obj-C enum is kept in sync with the | 12 // Make sure this Obj-C enum is kept in sync with the |
13 // PlatformNotificationServiceImpl NotificationOperation enum. | 13 // notification_operation_common::NotificationOperation enum. |
14 // The latter cannot be reused because the XPC service is not aware of | 14 // The latter cannot be reused because the XPC service is not aware of |
15 // PlatformNotificationCenter. | 15 // PlatformNotificationCenter. |
16 enum NotificationOperation { | 16 enum NotificationOperation { |
17 NOTIFICATION_CLICK = 0, | 17 NOTIFICATION_CLICK = 0, |
18 NOTIFICATION_CLOSE = 1, | 18 NOTIFICATION_CLOSE = 1, |
19 NOTIFICATION_SETTINGS = 2 | 19 NOTIFICATION_SETTINGS = 2 |
20 }; | 20 }; |
21 } // namespace | 21 } // namespace |
22 | 22 |
23 @implementation NotificationResponseBuilder | 23 @implementation NotificationResponseBuilder |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 notification_constants::kNotificationProfileId : profileId, | 89 notification_constants::kNotificationProfileId : profileId, |
90 notification_constants::kNotificationIncognito : incognito, | 90 notification_constants::kNotificationIncognito : incognito, |
91 notification_constants::kNotificationOperation : | 91 notification_constants::kNotificationOperation : |
92 [NSNumber numberWithInt:operation], | 92 [NSNumber numberWithInt:operation], |
93 notification_constants:: | 93 notification_constants:: |
94 kNotificationButtonIndex : [NSNumber numberWithInt:buttonIndex], | 94 kNotificationButtonIndex : [NSNumber numberWithInt:buttonIndex], |
95 }; | 95 }; |
96 } | 96 } |
97 | 97 |
98 @end | 98 @end |
OLD | NEW |