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

Unified Diff: content/child/notifications/notification_manager.h

Issue 1014073002: Implement getting notifications up to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/child/notifications/notification_manager.h
diff --git a/content/child/notifications/notification_manager.h b/content/child/notifications/notification_manager.h
index 6adce8741ea7a7368fbfd9fdbf2786b32c49cb0c..ae9a1ecbb8f8cadd514b94302973e7759a159bd8 100644
--- a/content/child/notifications/notification_manager.h
+++ b/content/child/notifications/notification_manager.h
@@ -7,18 +7,22 @@
#include <map>
#include <set>
+#include <vector>
+#include "base/id_map.h"
#include "base/memory/ref_counted.h"
#include "base/single_thread_task_runner.h"
#include "content/child/notifications/notification_dispatcher.h"
#include "content/child/notifications/pending_notifications_tracker.h"
#include "content/child/worker_task_runner.h"
+#include "content/common/platform_notification_messages.h"
#include "third_party/WebKit/public/platform/modules/notifications/WebNotificationManager.h"
class SkBitmap;
namespace content {
+struct PlatformNotificationData;
class ThreadSafeSender;
class NotificationManager : public blink::WebNotificationManager,
@@ -45,6 +49,10 @@ class NotificationManager : public blink::WebNotificationManager,
const blink::WebNotificationData& notification_data,
blink::WebServiceWorkerRegistration* service_worker_registration,
blink::WebNotificationShowCallbacks* callbacks);
+ virtual void getNotifications(
+ const blink::WebString& filter_tag,
+ blink::WebServiceWorkerRegistration* service_worker_registration,
+ blink::WebNotificationGetCallbacks* callbacks);
virtual void close(blink::WebNotificationDelegate* delegate);
virtual void closePersistent(
const blink::WebSerializedOrigin& origin,
@@ -67,6 +75,9 @@ class NotificationManager : public blink::WebNotificationManager,
void OnDidShow(int notification_id);
void OnDidClose(int notification_id);
void OnDidClick(int notification_id);
+ void OnDidGetNotifications(
+ int request_id,
+ const std::vector<PersistentNotificationInfo>& notification_infos);
// To be called when a page notification is ready to be displayed. Will
// inform the browser process about all available data. The |delegate|,
@@ -96,6 +107,10 @@ class NotificationManager : public blink::WebNotificationManager,
// ones, until all their associated resources have been fetched.
PendingNotificationsTracker pending_notifications_;
+ // Tracks pending requests for getting a list of notifications.
+ IDMap<blink::WebNotificationGetCallbacks, IDMapOwnPointer>
+ pending_get_notification_requests_;
+
// Map to store the delegate associated with a notification request Id.
std::map<int, blink::WebNotificationDelegate*> active_page_notifications_;
« no previous file with comments | « content/child/notifications/notification_dispatcher.cc ('k') | content/child/notifications/notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698