| Index: chrome/browser/notifications/dbus_notification_manager.h
|
| diff --git a/chrome/browser/notifications/dbus_notification_manager.h b/chrome/browser/notifications/dbus_notification_manager.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3fd2536adfcf2f73c3e3d3f46baac871eb4af847
|
| --- /dev/null
|
| +++ b/chrome/browser/notifications/dbus_notification_manager.h
|
| @@ -0,0 +1,40 @@
|
| +// 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_DBUS_NOTIFICATION_MANAGER_H_
|
| +#define CHROME_BROWSER_NOTIFICATIONS_DBUS_NOTIFICATION_MANAGER_H_
|
| +
|
| +#include <gio/gio.h>
|
| +
|
| +#include "base/macros.h"
|
| +#include "ui/message_center/message_center.h"
|
| +#include "ui/message_center/message_center_observer.h"
|
| +
|
| +class DbusNotificationManager : public message_center::MessageCenterObserver {
|
| + public:
|
| + // Returns a new DbusNotificationManager if system notifications are
|
| + // supported, otherwise returns nullptr.
|
| + static DbusNotificationManager* CreateDbusNotificationManager(
|
| + message_center::MessageCenter* message_center);
|
| +
|
| + ~DbusNotificationManager() override;
|
| +
|
| + // Overridden from message_center::MessageCenterObserver.
|
| + void OnNotificationAdded(const std::string& notification_id) override;
|
| + void OnNotificationRemoved(const std::string& notification_id,
|
| + bool by_user) override;
|
| + void OnNotificationUpdated(const std::string& notification_id) override;
|
| +
|
| + private:
|
| + DbusNotificationManager(message_center::MessageCenter* message_center,
|
| + GDBusProxy* notification_proxy);
|
| +
|
| + message_center::MessageCenter* message_center_;
|
| +
|
| + GDBusProxy* notification_proxy_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DbusNotificationManager);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_NOTIFICATIONS_DBUS_NOTIFICATION_MANAGER_H_
|
|
|