Chromium Code Reviews| Index: chrome/browser/notifications/chrome_notification_display_service.h |
| diff --git a/chrome/browser/notifications/chrome_notification_display_service.h b/chrome/browser/notifications/chrome_notification_display_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..aaf1b97cfb9ec2321b2c6aca6561c07344e0898e |
| --- /dev/null |
| +++ b/chrome/browser/notifications/chrome_notification_display_service.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_NOTIFICATIONS_CHROME_NOTIFICATION_DISPLAY_SERVICE_H_ |
| +#define CHROME_BROWSER_NOTIFICATIONS_CHROME_NOTIFICATION_DISPLAY_SERVICE_H_ |
| + |
| +#include "base/macros.h" |
| +#include "chrome/browser/notifications/notification_display_service.h" |
| + |
| +class Notification; |
| +class NotificationUIManager; |
| +class Profile; |
| + |
| +// Implementation of display service for notifications displayed by chrome |
|
Peter Beverloo
2016/04/18 14:57:09
Meta question: should we have a MessageCenterNotif
Peter Beverloo
2016/04/18 14:57:09
Could we call this MessageCenter(Notification)Disp
Miguel Garcia
2016/04/19 14:24:57
Discussed offline, I found myself converting back
Miguel Garcia
2016/04/19 14:24:57
OK, it seemed more descriptive this way, went with
|
| +// instead of the native platform notification center. |
| +class ChromeNotificationDisplayService : public NotificationDisplayService { |
| + public: |
| + ChromeNotificationDisplayService(Profile* profile, |
| + NotificationUIManager* ui_manager); |
| + ~ChromeNotificationDisplayService() override; |
| + |
| + void Display(const std::string& notification_id, |
|
Peter Beverloo
2016/04/18 14:57:09
nit:
// NotificationDisplayService implementation
Miguel Garcia
2016/04/19 14:24:57
Done.
|
| + const Notification& notification) override; |
| + void Close(const std::string& notification_id) override; |
| + bool GetDisplayed(std::set<std::string>* notifications) const override; |
| + bool SupportsNotificationCenter() const override; |
| + |
| + private: |
| + Profile* profile_; |
| + NotificationUIManager* ui_manager_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ChromeNotificationDisplayService); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_NOTIFICATIONS_CHROME_NOTIFICATION_DISPLAY_SERVICE_H_ |