From 1328c85eefff7f15b61da86a0356d6166ea05ae7 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Thu, 28 Mar 2013 17:20:06 -0400 Subject: [PATCH] Fire a `show` event when a notification is shown --- brightray/browser/browser_client_mac.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/brightray/browser/browser_client_mac.mm b/brightray/browser/browser_client_mac.mm index 8cc4b5cd3e53..f3b235e0ace2 100644 --- a/brightray/browser/browser_client_mac.mm +++ b/brightray/browser/browser_client_mac.mm @@ -1,6 +1,7 @@ #import "browser/browser_client.h" #import "base/strings/sys_string_conversions.h" +#import "content/public/browser/render_view_host.h" #import "content/public/common/show_desktop_notification_params.h" #import @@ -18,6 +19,12 @@ void BrowserClient::ShowDesktopNotification( [NSUserNotificationCenter.defaultUserNotificationCenter deliverNotification:notification]; [notification release]; + + auto host = content::RenderViewHost::FromID(render_process_id, render_view_id); + if (!host) + return; + + host->DesktopNotificationPostDisplay(params.notification_id); } }