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

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

Issue 2392343002: Plumbing in notification replies: PlatformNotificationService -> SW (Closed)
Patch Set: include base/logging.h for NOTIMPLEMENTED Created 4 years, 2 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
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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "content/public/browser/notification_database_data.h" 10 #include "content/public/browser/notification_database_data.h"
11 #include "content/public/browser/notification_event_dispatcher.h" 11 #include "content/public/browser/notification_event_dispatcher.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class NotificationEventDispatcherImpl : public NotificationEventDispatcher { 15 class NotificationEventDispatcherImpl : public NotificationEventDispatcher {
16 public: 16 public:
17 // Returns the instance of the NotificationEventDispatcherImpl. Must be called 17 // Returns the instance of the NotificationEventDispatcherImpl. Must be called
18 // on the UI thread. 18 // on the UI thread.
19 static NotificationEventDispatcherImpl* GetInstance(); 19 static NotificationEventDispatcherImpl* GetInstance();
20 20
21 // NotificationEventDispatcher implementation. 21 // NotificationEventDispatcher implementation.
22 void DispatchNotificationClickEvent( 22 void DispatchNotificationClickEvent(
23 BrowserContext* browser_context, 23 BrowserContext* browser_context,
24 const std::string& notification_id, 24 const std::string& notification_id,
25 const GURL& origin, 25 const GURL& origin,
26 int action_index, 26 int action_index,
27 const base::NullableString16& reply,
27 const NotificationDispatchCompleteCallback& dispatch_complete_callback) 28 const NotificationDispatchCompleteCallback& dispatch_complete_callback)
28 override; 29 override;
29 void DispatchNotificationCloseEvent( 30 void DispatchNotificationCloseEvent(
30 BrowserContext* browser_context, 31 BrowserContext* browser_context,
31 const std::string& notification_id, 32 const std::string& notification_id,
32 const GURL& origin, 33 const GURL& origin,
33 bool by_user, 34 bool by_user,
34 const NotificationDispatchCompleteCallback& dispatch_complete_callback) 35 const NotificationDispatchCompleteCallback& dispatch_complete_callback)
35 override; 36 override;
36 37
37 private: 38 private:
38 NotificationEventDispatcherImpl(); 39 NotificationEventDispatcherImpl();
39 ~NotificationEventDispatcherImpl() override; 40 ~NotificationEventDispatcherImpl() override;
40 41
41 friend struct base::DefaultSingletonTraits<NotificationEventDispatcherImpl>; 42 friend struct base::DefaultSingletonTraits<NotificationEventDispatcherImpl>;
42 43
43 DISALLOW_COPY_AND_ASSIGN(NotificationEventDispatcherImpl); 44 DISALLOW_COPY_AND_ASSIGN(NotificationEventDispatcherImpl);
44 }; 45 };
45 46
46 } // namespace content 47 } // namespace content
47 48
48 #endif // CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_ 49 #endif // CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698