Chromium Code Reviews| Index: chrome/browser/notifications/stub_notification_platform_bridge.h |
| diff --git a/chrome/browser/notifications/stub_notification_platform_bridge.h b/chrome/browser/notifications/stub_notification_platform_bridge.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e7e9bf48e91049a37bd2f56f44d825177d3921ba |
| --- /dev/null |
| +++ b/chrome/browser/notifications/stub_notification_platform_bridge.h |
| @@ -0,0 +1,39 @@ |
| +// 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_STUB_NOTIFICATION_PLATFORM_BRIDGE_H_ |
|
Peter Beverloo
2016/04/25 13:37:29
nit: blank line above here.
Miguel Garcia
2016/04/25 17:19:59
Done.
|
| +#define CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_PLATFORM_BRIDGE_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/macros.h" |
| +#include "chrome/browser/notifications/notification.h" |
| +#include "chrome/browser/notifications/notification_platform_bridge.h" |
| + |
| +// Implementation of NotificationPlatformBridge used for tests. |
| +class StubNotificationPlatformBridge : public NotificationPlatformBridge { |
| + public: |
| + StubNotificationPlatformBridge(); |
| + ~StubNotificationPlatformBridge() override; |
| + |
| + // Returns the notification being displayed at position |index|. |
| + Notification GetNotificationAt(size_t index); |
| + |
| + // NotificationPlatformBridge implementation. |
| + void Display(const std::string& notification_id, |
| + const std::string& profile_id, |
| + bool incognito, |
| + const Notification& notification) override; |
| + void Close(const std::string& profile_id, |
| + const std::string& notification_id) override; |
| + bool GetDisplayed(const std::string& profile_id, |
| + bool incognito, |
| + std::set<std::string>* notifications) const override; |
| + bool SupportsNotificationCenter() const override; |
| + |
| + private: |
| + std::vector<Notification> notifications_; |
| + DISALLOW_COPY_AND_ASSIGN(StubNotificationPlatformBridge); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_PLATFORM_BRIDGE_H_ |