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

Side by Side Diff: content/browser/notifications/notification_event_dispatcher_impl.h

Issue 2917923004: Move handler processing to NotificationDisplayService
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/notifications/stub_notification_display_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_
6 #define CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_ 6 #define CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "content/public/browser/notification_database_data.h" 12 #include "content/public/browser/notification_database_data.h"
13 #include "content/public/browser/notification_event_dispatcher.h" 13 #include "content/public/browser/notification_event_dispatcher.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class NotificationEventDispatcherImpl : public NotificationEventDispatcher { 17 class NotificationEventDispatcherImpl : public NotificationEventDispatcher {
18 public: 18 public:
19 // Returns the instance of the NotificationEventDispatcherImpl. Must be called 19 // Returns the instance of the NotificationEventDispatcherImpl. Must be called
20 // on the UI thread. 20 // on the UI thread.
21 static NotificationEventDispatcherImpl* GetInstance(); 21 static NotificationEventDispatcherImpl* GetInstance();
22 22
23 // NotificationEventDispatcher implementation. 23 // NotificationEventDispatcher implementation.
24
25 // TODO(miguelg) rename so it says Persistent.
24 void DispatchNotificationClickEvent( 26 void DispatchNotificationClickEvent(
25 BrowserContext* browser_context, 27 BrowserContext* browser_context,
26 const std::string& notification_id, 28 const std::string& notification_id,
27 const GURL& origin, 29 const GURL& origin,
28 int action_index, 30 int action_index,
29 const base::NullableString16& reply, 31 const base::NullableString16& reply,
30 const NotificationDispatchCompleteCallback& dispatch_complete_callback) 32 const NotificationDispatchCompleteCallback& dispatch_complete_callback)
31 override; 33 override;
32 void DispatchNotificationCloseEvent( 34 void DispatchNotificationCloseEvent(
33 BrowserContext* browser_context, 35 BrowserContext* browser_context,
(...skipping 30 matching lines...) Expand all
64 std::map<std::string, int> non_persistent_ids_; 66 std::map<std::string, int> non_persistent_ids_;
65 67
66 friend struct base::DefaultSingletonTraits<NotificationEventDispatcherImpl>; 68 friend struct base::DefaultSingletonTraits<NotificationEventDispatcherImpl>;
67 69
68 DISALLOW_COPY_AND_ASSIGN(NotificationEventDispatcherImpl); 70 DISALLOW_COPY_AND_ASSIGN(NotificationEventDispatcherImpl);
69 }; 71 };
70 72
71 } // namespace content 73 } // namespace content
72 74
73 #endif // CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_ 75 #endif // CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/notifications/stub_notification_display_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698