Fire a show
event when a notification is shown
This commit is contained in:
parent
0893253188
commit
1328c85eef
1 changed files with 7 additions and 0 deletions
|
@ -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 <Foundation/Foundation.h>
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue