Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: chrome/browser/notifications/notification_platform_bridge_mac.mm

Issue 2418153002: Hooking up Android N inline notification replies end-to-end (Closed)
Patch Set: Reformat getNotificationReply Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "base/mac/bundle_locations.h" 11 #include "base/mac/bundle_locations.h"
12 #include "base/mac/foundation_util.h" 12 #include "base/mac/foundation_util.h"
13 #include "base/mac/mac_util.h" 13 #include "base/mac/mac_util.h"
14 #include "base/mac/scoped_nsobject.h" 14 #include "base/mac/scoped_nsobject.h"
15 #include "base/strings/nullable_string16.h"
15 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/sys_string_conversions.h" 17 #include "base/strings/sys_string_conversions.h"
17 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/notifications/native_notification_display_service.h" 19 #include "chrome/browser/notifications/native_notification_display_service.h"
19 #include "chrome/browser/notifications/notification.h" 20 #include "chrome/browser/notifications/notification.h"
20 #include "chrome/browser/notifications/notification_common.h" 21 #include "chrome/browser/notifications/notification_common.h"
21 #include "chrome/browser/notifications/notification_display_service_factory.h" 22 #include "chrome/browser/notifications/notification_display_service_factory.h"
22 #include "chrome/browser/notifications/persistent_notification_delegate.h" 23 #include "chrome/browser/notifications/persistent_notification_delegate.h"
23 #include "chrome/browser/notifications/platform_notification_service_impl.h" 24 #include "chrome/browser/notifications/platform_notification_service_impl.h"
24 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Perhaps propagate this through PersistentNotificationStatus. 69 // Perhaps propagate this through PersistentNotificationStatus.
69 LOG(WARNING) << "Profile not loaded correctly"; 70 LOG(WARNING) << "Profile not loaded correctly";
70 return; 71 return;
71 } 72 }
72 73
73 NotificationDisplayService* display_service = 74 NotificationDisplayService* display_service =
74 NotificationDisplayServiceFactory::GetForProfile(profile); 75 NotificationDisplayServiceFactory::GetForProfile(profile);
75 76
76 static_cast<NativeNotificationDisplayService*>(display_service) 77 static_cast<NativeNotificationDisplayService*>(display_service)
77 ->ProcessNotificationOperation(operation, notification_type, origin, 78 ->ProcessNotificationOperation(operation, notification_type, origin,
78 notification_id, action_index); 79 notification_id, action_index,
80 base::NullableString16() /* reply */);
79 } 81 }
80 82
81 // Loads the profile and process the Notification response 83 // Loads the profile and process the Notification response
82 void DoProcessNotificationResponse(NotificationCommon::Operation operation, 84 void DoProcessNotificationResponse(NotificationCommon::Operation operation,
83 NotificationCommon::Type type, 85 NotificationCommon::Type type,
84 const std::string& profile_id, 86 const std::string& profile_id,
85 bool incognito, 87 bool incognito,
86 const std::string& origin, 88 const std::string& origin,
87 const std::string& notification_id, 89 const std::string& notification_id,
88 int32_t button_index) { 90 int32_t button_index) {
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 [[xpcConnection_ remoteObjectProxy] closeAllNotifications]; 475 [[xpcConnection_ remoteObjectProxy] closeAllNotifications];
474 } 476 }
475 477
476 // NotificationReply implementation 478 // NotificationReply implementation
477 - (void)notificationClick:(NSDictionary*)notificationResponseData { 479 - (void)notificationClick:(NSDictionary*)notificationResponseData {
478 NotificationPlatformBridgeMac::ProcessNotificationResponse( 480 NotificationPlatformBridgeMac::ProcessNotificationResponse(
479 notificationResponseData); 481 notificationResponseData);
480 } 482 }
481 483
482 @end 484 @end
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification_platform_bridge_android.cc ('k') | chrome/test/data/notifications/android_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698