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

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

Issue 2794103002: Add initial support for native Linux desktop notifications (Closed)
Patch Set: Refactor, move impl to chrome/browser/notifications Created 3 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
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_DBUS_NOTIFICATION_MANAGER_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_DBUS_NOTIFICATION_MANAGER_H_
7
8 #include <gio/gio.h>
9
10 #include "base/macros.h"
11 #include "ui/message_center/message_center.h"
12 #include "ui/message_center/message_center_observer.h"
13
14 class DbusNotificationManager : public message_center::MessageCenterObserver {
15 public:
16 // Returns a new DbusNotificationManager if system notifications are
17 // supported, otherwise returns nullptr.
18 static DbusNotificationManager* CreateDbusNotificationManager(
19 message_center::MessageCenter* message_center);
20
21 ~DbusNotificationManager() override;
22
23 // Overridden from message_center::MessageCenterObserver.
24 void OnNotificationAdded(const std::string& notification_id) override;
25 void OnNotificationRemoved(const std::string& notification_id,
26 bool by_user) override;
27 void OnNotificationUpdated(const std::string& notification_id) override;
28
29 private:
30 DbusNotificationManager(message_center::MessageCenter* message_center,
31 GDBusProxy* notification_proxy);
32
33 message_center::MessageCenter* message_center_;
34
35 GDBusProxy* notification_proxy_;
36
37 DISALLOW_COPY_AND_ASSIGN(DbusNotificationManager);
38 };
39
40 #endif // CHROME_BROWSER_NOTIFICATIONS_DBUS_NOTIFICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698