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

Side by Side Diff: chrome/browser/ui/cocoa/notifications/notification_service_delegate.mm

Issue 2390153005: Implement support for closing mac native notifications (Closed)
Patch Set: review 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 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 <AppKit/AppKit.h> 5 #import <AppKit/AppKit.h>
6 6
7 #import "chrome/browser/ui/cocoa/notifications/notification_service_delegate.h" 7 #import "chrome/browser/ui/cocoa/notifications/notification_service_delegate.h"
8 8
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #import "chrome/browser/ui/cocoa/notifications/alert_notification_service.h" 10 #import "chrome/browser/ui/cocoa/notifications/alert_notification_service.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 // NSUserNotification center delegate 55 // NSUserNotification center delegate
56 - (void)userNotificationCenter:(NSUserNotificationCenter*)center 56 - (void)userNotificationCenter:(NSUserNotificationCenter*)center
57 didActivateNotification:(NSUserNotification*)notification { 57 didActivateNotification:(NSUserNotification*)notification {
58 NSDictionary* response = 58 NSDictionary* response =
59 [NotificationResponseBuilder buildDictionary:notification]; 59 [NotificationResponseBuilder buildDictionary:notification];
60 [[connection_ remoteObjectProxy] notificationClick:response]; 60 [[connection_ remoteObjectProxy] notificationClick:response];
61 } 61 }
62 62
63 // _NSUserNotificationCenterDelegatePrivate
64 - (void)userNotificationCenter:(NSUserNotificationCenter*)center
65 didDismissAlert:(NSUserNotification*)notification {
66 NSDictionary* response =
67 [NotificationResponseBuilder buildDictionary:notification];
68 [[connection_ remoteObjectProxy] notificationClick:response];
69 }
70
63 @end 71 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698