Overload method for naming consistency

This commit is contained in:
Zhuo Lu 2018-01-16 19:07:54 -08:00
parent 75b990faff
commit 0b7a629a41
3 changed files with 6 additions and 6 deletions

View file

@ -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_; }

View file

@ -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);

View file

@ -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]);
}
}
}