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

Unified Diff: content/browser/notifications/persistent_notification_delegate.h

Issue 1116693002: [NOT FOR REVIEW] Significantly simplify the PlatformNotificationService //content API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: content/browser/notifications/persistent_notification_delegate.h
diff --git a/content/browser/notifications/persistent_notification_delegate.h b/content/browser/notifications/persistent_notification_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..154b1aa6404bffcb8874e2609cf8b71adfb700cb
--- /dev/null
+++ b/content/browser/notifications/persistent_notification_delegate.h
@@ -0,0 +1,42 @@
+// Copyright 2015 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 CONTENT_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_
+#define CONTENT_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_
+
+#include <stdint.h>
+
+#include "ui/message_center/notification_delegate.h"
+#include "url/gurl.h"
+
+namespace content {
+
+class BrowserContext;
+
+//
+class PersistentNotificationDelegate
+ : public message_center::NotificationDelegate {
+ public:
+ PersistentNotificationDelegate(BrowserContext* browser_context,
+ const GURL& origin,
+ int64_t persistent_notification_id);
+
+ // message_center::NotificationDelegate implementation.
+ void Display() override {}
+ void Close(bool by_user) override;
+ bool HasClickedListener() override;
+ void Click() override;
+ void ButtonClick(int button_index) override {}
+
+ private:
+ ~PersistentNotificationDelegate() override;
+
+ BrowserContext* browser_context_;
+ GURL origin_;
+ int64_t persistent_notification_id_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698