OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "chrome/browser/notifications/notification_platform_bridge_mac.h" | 5 #include "chrome/browser/notifications/notification_platform_bridge_mac.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 @class NSUserNotificationCenter; | 39 @class NSUserNotificationCenter; |
40 | 40 |
41 // The mapping from web notifications to NsUserNotification works as follows | 41 // The mapping from web notifications to NsUserNotification works as follows |
42 | 42 |
43 // notification#title in NSUserNotification.title | 43 // notification#title in NSUserNotification.title |
44 // notification#message in NSUserNotification.informativeText | 44 // notification#message in NSUserNotification.informativeText |
45 // notification#context_message in NSUserNotification.subtitle | 45 // notification#context_message in NSUserNotification.subtitle |
46 // notification#tag in NSUserNotification.identifier (10.9) | 46 // notification#tag in NSUserNotification.identifier (10.9) |
47 // notification#icon in NSUserNotification.contentImage (10.9) | 47 // notification#icon in NSUserNotification.contentImage (10.9) |
48 // Site settings button is implemented as NSUserNotification's action button | 48 // Site settings button is implemented as NSUserNotification's action button |
49 // Not possible to implement: | 49 // Not easy to implement: |
50 // -notification.requireInteraction | 50 // -notification.requireInteraction |
51 // -The event associated to the close button | 51 // -The event associated to the close button |
52 | 52 |
53 // TODO(miguelg) implement the following features | 53 // TODO(miguelg) implement the following features |
54 // - Sound names can be implemented by setting soundName in NSUserNotification | 54 // - Sound names can be implemented by setting soundName in NSUserNotification |
55 // NSUserNotificationDefaultSoundName gives you the platform default. | 55 // NSUserNotificationDefaultSoundName gives you the platform default. |
56 | 56 |
57 namespace { | 57 namespace { |
58 | 58 |
59 // Callback to run once the profile has been loaded in order to perform a | 59 // Callback to run once the profile has been loaded in order to perform a |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 [[xpcConnection_ remoteObjectProxy] deliverNotification:data]; | 427 [[xpcConnection_ remoteObjectProxy] deliverNotification:data]; |
428 } | 428 } |
429 | 429 |
430 // NotificationReply implementation | 430 // NotificationReply implementation |
431 - (void)notificationClick:(NSDictionary*)notificationResponseData { | 431 - (void)notificationClick:(NSDictionary*)notificationResponseData { |
432 NotificationPlatformBridgeMac::ProcessNotificationResponse( | 432 NotificationPlatformBridgeMac::ProcessNotificationResponse( |
433 notificationResponseData); | 433 notificationResponseData); |
434 } | 434 } |
435 | 435 |
436 @end | 436 @end |
OLD | NEW |