RESOLVED FIXED151951
[GTK] Notify WebCore when notification is clicked
https://bugs.webkit.org/show_bug.cgi?id=151951
Summary [GTK] Notify WebCore when notification is clicked
Gustavo Noronha (kov)
Reported 2015-12-07 11:34:15 PST
[GTK] Notify WebCore when notification is clicked
Attachments
Patch (11.35 KB, patch)
2015-12-07 11:38 PST, Gustavo Noronha (kov)
no flags
Patch (12.21 KB, patch)
2015-12-07 12:43 PST, Gustavo Noronha (kov)
cgarcia: review+
cgarcia: commit-queue-
Gustavo Noronha (kov)
Comment 1 2015-12-07 11:38:03 PST
Carlos Garcia Campos
Comment 2 2015-12-07 11:54:15 PST
Comment on attachment 266793 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=266793&action=review Cool! > Source/WebKit2/UIProcess/API/gtk/WebKitNotification.cpp:255 > + * webkit_notification_notify_clicked: So, for close we have close for the method and closed for the signal, so we could probably do the same here for consistency, webkit_notification_click -> emits clicked. It's true that the notification was already clicked at this point, so maybwe could simply remove the _notify webkit_notification_clicked -> emits clicked > Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:624 > + notify_notification_add_action(notification, "default", _("Acknowledge"), NOTIFY_ACTION_CALLBACK(notifyNotificationClicked), webNotification, nullptr); What's this Acknowledge string? is that shown somewhere or just a required argument of libnotify? It it's not exposed we could probably avoid translating it. > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:735 > + m_event = None; > + webkit_notification_notify_clicked(m_notification); > + // No mainloop spinning since the above will emit the signal already. I think we should check here that onclick is emitted in js after this. So, we could od the same we do for onclose, add some js code that sends a user message back to the ui process.
Gustavo Noronha (kov)
Comment 3 2015-12-07 12:43:08 PST
Carlos Garcia Campos
Comment 4 2015-12-07 12:54:35 PST
Comment on attachment 266796 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=266796&action=review > Source/WebKit2/UIProcess/API/gtk/WebKitNotification.cpp:158 > + * Emitted when a notification has been clicked. See webkit_notification_notify_clicked(). webkit_notification_notify_clicked -> webkit_notification_clicked
Gustavo Noronha (kov)
Comment 5 2015-12-08 00:26:47 PST
Note You need to log in before you can comment on or make changes to this bug.