Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: chrome/browser/notifications/stub_notification_platform_bridge.h

Issue 1895473002: PlatformNotificationService layering cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@display_manager2
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698