08f393437e
It's a little icky to be taking over global state (NSUserNotificationCenter's delegate) like this, but until we have evidence that it gets in someone's way it's the pragmatic thing to do.
28 lines
646 B
Objective-C
28 lines
646 B
Objective-C
#ifndef BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_MAC_H_
|
|
#define BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_MAC_H_
|
|
|
|
#import "browser/notification_presenter.h"
|
|
|
|
#import "base/memory/scoped_nsobject.h"
|
|
|
|
@class BRYUserNotificationCenterDelegate;
|
|
|
|
namespace brightray {
|
|
|
|
class NotificationPresenterMac : public NotificationPresenter {
|
|
public:
|
|
NotificationPresenterMac();
|
|
~NotificationPresenterMac();
|
|
|
|
virtual void ShowNotification(
|
|
const content::ShowDesktopNotificationHostMsgParams&,
|
|
int render_process_id,
|
|
int render_view_id) OVERRIDE;
|
|
|
|
private:
|
|
scoped_nsobject<BRYUserNotificationCenterDelegate> delegate_;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|