2013-03-29 09:36:07 -04:00
|
|
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
|
|
// Copyright (c) 2013 Adam Roben <adam@roben.org>. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE-CHROMIUM file.
|
|
|
|
|
2013-03-28 18:03:58 -04:00
|
|
|
#ifndef BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_MAC_H_
|
|
|
|
#define BRIGHTRAY_BROWSER_NOTIFICATION_PRESENTER_MAC_H_
|
|
|
|
|
|
|
|
#import "browser/notification_presenter.h"
|
|
|
|
|
2013-10-07 15:17:39 -04:00
|
|
|
#import "base/mac/scoped_nsobject.h"
|
2013-03-29 09:36:07 -04:00
|
|
|
#import <map>
|
2013-03-28 18:08:34 -04:00
|
|
|
|
|
|
|
@class BRYUserNotificationCenterDelegate;
|
2013-03-28 18:03:58 -04:00
|
|
|
|
|
|
|
namespace brightray {
|
|
|
|
|
|
|
|
class NotificationPresenterMac : public NotificationPresenter {
|
|
|
|
public:
|
|
|
|
NotificationPresenterMac();
|
|
|
|
~NotificationPresenterMac();
|
|
|
|
|
|
|
|
virtual void ShowNotification(
|
|
|
|
const content::ShowDesktopNotificationHostMsgParams&,
|
|
|
|
int render_process_id,
|
|
|
|
int render_view_id) OVERRIDE;
|
2013-03-29 09:36:07 -04:00
|
|
|
virtual void CancelNotification(
|
|
|
|
int render_process_id,
|
|
|
|
int render_view_id,
|
|
|
|
int notification_id) OVERRIDE;
|
2013-03-28 18:08:34 -04:00
|
|
|
|
|
|
|
private:
|
2013-11-17 18:43:20 -05:00
|
|
|
typedef NotificationMap std::map<std::string,
|
|
|
|
base::scoped_nsobject<NSUserNotification>>;
|
|
|
|
NotificationMap notification_map_;
|
2013-10-07 15:17:39 -04:00
|
|
|
base::scoped_nsobject<BRYUserNotificationCenterDelegate> delegate_;
|
2013-03-28 18:03:58 -04:00
|
|
|
};
|
|
|
|
|
2013-11-17 18:20:17 -05:00
|
|
|
} // namespace brightray
|
2013-03-28 18:03:58 -04:00
|
|
|
|
|
|
|
#endif
|