Index: content/browser/notifications/notification_event_dispatcher_impl.h |
diff --git a/content/browser/notifications/notification_event_dispatcher_impl.h b/content/browser/notifications/notification_event_dispatcher_impl.h |
index a0b0399e470cc43f2f234cfb010f91ed9c855d38..089f000bfa2feaa49ff4c3d0906fde6189288103 100644 |
--- a/content/browser/notifications/notification_event_dispatcher_impl.h |
+++ b/content/browser/notifications/notification_event_dispatcher_impl.h |
@@ -5,6 +5,8 @@ |
#ifndef CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_ |
#define CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_ |
+#include <map> |
+ |
#include "base/macros.h" |
#include "base/memory/singleton.h" |
#include "content/public/browser/notification_database_data.h" |
@@ -19,6 +21,8 @@ class NotificationEventDispatcherImpl : public NotificationEventDispatcher { |
static NotificationEventDispatcherImpl* GetInstance(); |
// NotificationEventDispatcher implementation. |
+ |
+ // TODO(miguelg) rename so it says Persistent. |
Peter Beverloo
2017/05/31 17:52:43
Out of interest, why? Wouldn't it make the API sim
Miguel Garcia
2017/06/01 17:00:53
You mean having a single Dispatch method with comp
Peter Beverloo
2017/06/01 17:56:27
Ideally the embedder (i.e. //chrome) wouldn't have
Miguel Garcia
2017/06/02 12:37:12
Acknowledged.
|
void DispatchNotificationClickEvent( |
BrowserContext* browser_context, |
const std::string& notification_id, |
@@ -35,10 +39,27 @@ class NotificationEventDispatcherImpl : public NotificationEventDispatcher { |
const NotificationDispatchCompleteCallback& dispatch_complete_callback) |
override; |
Peter Beverloo
2017/05/31 17:52:43
nit: no line breaks in override blocks like this.
Miguel Garcia
2017/06/01 17:00:53
Done.
|
+ void RegisterNonPersistentNotification(const std::string& notification_id, |
+ int renderer_id, |
+ int non_persistent_id) override; |
+ void DispatchNonPersistentShowEvent( |
+ const std::string& notification_id) override; |
+ void DispatchNonPersistentClickEvent( |
+ const std::string& notification_id) override; |
+ void DispatchNonPersistentCloseEvent( |
+ const std::string& notification_id) override; |
+ void RendererGone(int renderer_id) override; |
+ |
private: |
NotificationEventDispatcherImpl(); |
~NotificationEventDispatcherImpl() override; |
+ // Notification Id -> renderer id |
+ std::map<std::string, int> notification_renderers_; |
+ |
+ // Notification real id -> non persistent id. |
Peter Beverloo
2017/05/31 17:52:43
What is a "real" notification Id?
Since everythin
Miguel Garcia
2017/06/01 17:00:53
It just feels harder to read when both members of
Peter Beverloo
2017/06/01 17:56:27
But much simpler code since we'd only have to care
Peter Beverloo
2017/06/01 17:56:27
"Peter Beverlif you oo wrote:"
lol how did you do
Miguel Garcia
2017/06/02 12:37:13
I have no idea...
|
+ std::map<std::string, int> notification_ids_; |
+ |
friend struct base::DefaultSingletonTraits<NotificationEventDispatcherImpl>; |
DISALLOW_COPY_AND_ASSIGN(NotificationEventDispatcherImpl); |