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

Unified Diff: chrome/browser/notifications/notification_platform_bridge_linux.h

Issue 2794103002: Add initial support for native Linux desktop notifications (Closed)
Patch Set: Rebase, address peter@'s comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/notification_platform_bridge_linux.h
diff --git a/chrome/browser/notifications/notification_platform_bridge_linux.h b/chrome/browser/notifications/notification_platform_bridge_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..9b48f7340c4f8df88c4511e9dc586547869c2b42
--- /dev/null
+++ b/chrome/browser/notifications/notification_platform_bridge_linux.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
Lei Zhang 2017/04/04 07:47:21 It's 2017. :)
Tom (Use chromium acct) 2017/04/04 21:47:11 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_LINUX_H_
+#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_LINUX_H_
+
+#include <gio/gio.h>
+
+#include "base/macros.h"
+#include "chrome/browser/notifications/notification_platform_bridge.h"
+#include "ui/message_center/message_center.h"
+
+class NotificationPlatformBridgeLinux : public NotificationPlatformBridge {
+ public:
+ NotificationPlatformBridgeLinux(message_center::MessageCenter* message_center,
+ GDBusProxy* notification_proxy);
+
+ ~NotificationPlatformBridgeLinux() override;
+
+ // Overridden from NotificationPlatformBridge.
Lei Zhang 2017/04/04 07:47:21 Just // NotificationPlatformBridge: will suffice.
Tom (Use chromium acct) 2017/04/04 21:47:10 Done.
+ void Display(NotificationCommon::Type notification_type,
+ const std::string& notification_id,
+ const std::string& profile_id,
+ bool is_incognito,
+ const Notification& notification) override;
+ void Close(const std::string& profile_id,
+ const std::string& notification_id) override;
+ void GetDisplayed(
+ const std::string& profile_id,
+ bool incognito,
+ const DisplayedNotificationsCallback& callback) const override;
+
+ private:
+ message_center::MessageCenter* message_center_;
+
+ GDBusProxy* notification_proxy_;
Lei Zhang 2017/04/04 07:47:21 GDBusProxy* const, or maybe use ScopedGObject?
Tom (Use chromium acct) 2017/04/04 21:47:11 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(NotificationPlatformBridgeLinux);
+};
+
+#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PLATFORM_BRIDGE_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698