mirror of
https://github.com/electron/electron.git
synced 2026-01-28 08:48:14 -05:00
Overload method for naming consistency
This commit is contained in:
@@ -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_; }
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user