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

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

Issue 1925803002: Rename NotificationUIManagerMac to NotificationPlatformBridgeMac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2015 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
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_MAC_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_MAC_H_
7
8 #include <set>
9 #include <string>
10
11 #include "base/mac/scoped_nsobject.h"
12 #include "base/macros.h"
13 #include "chrome/browser/notifications/notification_platform_bridge.h"
14
15 class Notification;
16 @class NotificationCenterDelegate;
17 @class NSUserNotificationCenter;
18 class PrefService;
19
20 // This class is an implementation of NotificationPlatfrormBridge that will
21 // send platform notifications to the the MacOSX notification center.
22 class NotificationUIManagerMac : public NotificationPlatformBridge {
23 public:
24 explicit NotificationUIManagerMac(
25 NSUserNotificationCenter* notification_center);
26 ~NotificationUIManagerMac() override;
27
28 // NotificationPlatformBridge implementation.
29 void Display(const std::string& notification_id,
30 const std::string& profile_id,
31 bool incognito,
32 const Notification& notification) override;
33 void Close(const std::string& profile_id,
34 const std::string& notification_id) override;
35 bool GetDisplayed(const std::string& profile_id,
36 bool incognito,
37 std::set<std::string>* notifications) const override;
38 bool SupportsNotificationCenter() const override;
39
40 private:
41 // Cocoa class that receives callbacks from the NSUserNotificationCenter.
42 base::scoped_nsobject<NotificationCenterDelegate> delegate_;
43
44 // The notification center to use, this can be overriden in tests
45 NSUserNotificationCenter* notification_center_;
46
47 DISALLOW_COPY_AND_ASSIGN(NotificationUIManagerMac);
48 };
49
50 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification_ui_manager.h ('k') | chrome/browser/notifications/notification_ui_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698