OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 #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.
| |
5 #define CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_PLATFORM_BRIDGE_H_ | |
6 | |
7 #include <vector> | |
8 | |
9 #include "base/macros.h" | |
10 #include "chrome/browser/notifications/notification.h" | |
11 #include "chrome/browser/notifications/notification_platform_bridge.h" | |
12 | |
13 // Implementation of NotificationPlatformBridge used for tests. | |
14 class StubNotificationPlatformBridge : public NotificationPlatformBridge { | |
15 public: | |
16 StubNotificationPlatformBridge(); | |
17 ~StubNotificationPlatformBridge() override; | |
18 | |
19 // Returns the notification being displayed at position |index|. | |
20 Notification GetNotificationAt(size_t index); | |
21 | |
22 // NotificationPlatformBridge implementation. | |
23 void Display(const std::string& notification_id, | |
24 const std::string& profile_id, | |
25 bool incognito, | |
26 const Notification& notification) override; | |
27 void Close(const std::string& profile_id, | |
28 const std::string& notification_id) override; | |
29 bool GetDisplayed(const std::string& profile_id, | |
30 bool incognito, | |
31 std::set<std::string>* notifications) const override; | |
32 bool SupportsNotificationCenter() const override; | |
33 | |
34 private: | |
35 std::vector<Notification> notifications_; | |
36 DISALLOW_COPY_AND_ASSIGN(StubNotificationPlatformBridge); | |
37 }; | |
38 | |
39 #endif // CHROME_BROWSER_NOTIFICATIONS_STUB_NOTIFICATION_PLATFORM_BRIDGE_H_ | |
OLD | NEW |