[GTK] Notify WebCore when notification is clicked
Created attachment 266793 [details] Patch
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.
Created attachment 266796 [details] Patch
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
Committed r193721: <http://trac.webkit.org/changeset/193721>