From 0b7a629a4101996da23e42f0bcfec2a70a5c6101 Mon Sep 17 00:00:00 2001 From: Zhuo Lu Date: Tue, 16 Jan 2018 19:07:54 -0800 Subject: [PATCH] Overload method for naming consistency --- brightray/browser/mac/cocoa_notification.h | 4 ++-- brightray/browser/mac/cocoa_notification.mm | 4 ++-- brightray/browser/mac/notification_center_delegate.mm | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/brightray/browser/mac/cocoa_notification.h b/brightray/browser/mac/cocoa_notification.h index 3c2aa367ea..1cdd7e33b4 100644 --- a/brightray/browser/mac/cocoa_notification.h +++ b/brightray/browser/mac/cocoa_notification.h @@ -28,8 +28,8 @@ class CocoaNotification : public Notification { void NotificationDisplayed(); void NotificationReplied(const std::string& reply); - void NotificationButtonClicked(); - void NotificationAdditionalActionClicked(NSUserNotificationAction* action); + void NotificationActivated(); + void NotificationActivated(NSUserNotificationAction* action); NSUserNotification* notification() const { return notification_; } diff --git a/brightray/browser/mac/cocoa_notification.mm b/brightray/browser/mac/cocoa_notification.mm index 73bf44a05b..7d07862661 100644 --- a/brightray/browser/mac/cocoa_notification.mm +++ b/brightray/browser/mac/cocoa_notification.mm @@ -116,14 +116,14 @@ void CocoaNotification::NotificationReplied(const std::string& reply) { this->LogAction("replied to"); } -void CocoaNotification::NotificationButtonClicked() { +void CocoaNotification::NotificationActivated() { if (delegate()) delegate()->NotificationAction(action_index_); this->LogAction("button clicked"); } -void CocoaNotification::NotificationAdditionalActionClicked(NSUserNotificationAction* action) { +void CocoaNotification::NotificationActivated(NSUserNotificationAction* action) { if (delegate()) { unsigned index = action_index_; std::string identifier = base::SysNSStringToUTF8(action.identifier); diff --git a/brightray/browser/mac/notification_center_delegate.mm b/brightray/browser/mac/notification_center_delegate.mm index e4c9ab8a63..1cb3dc9a33 100644 --- a/brightray/browser/mac/notification_center_delegate.mm +++ b/brightray/browser/mac/notification_center_delegate.mm @@ -38,11 +38,11 @@ if (notif.activationType == NSUserNotificationActivationTypeContentsClicked) { notification->NotificationClicked(); } else if (notif.activationType == NSUserNotificationActivationTypeActionButtonClicked) { - notification->NotificationButtonClicked(); + notification->NotificationActivated(); } else if (notif.activationType == NSUserNotificationActivationTypeReplied) { notification->NotificationReplied([notif.response.string UTF8String]); } else if (notif.activationType == NSUserNotificationActivationTypeAdditionalActionClicked) { - notification->NotificationAdditionalActionClicked([notif additionalActivationAction]); + notification->NotificationActivated([notif additionalActivationAction]); } } }