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

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

Issue 1619703002: Implement notificationclose event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 4 years, 10 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 <stdint.h> 8 #include <stdint.h>
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_event_dispatcher.h" 13 #include "content/public/browser/notification_event_dispatcher.h"
13 14
14 namespace content { 15 namespace content {
15 16
16 class NotificationEventDispatcherImpl : public NotificationEventDispatcher { 17 class NotificationEventDispatcherImpl : public NotificationEventDispatcher {
17 public: 18 public:
18 // Returns the instance of the NotificationEventDispatcherImpl. Must be called 19 // Returns the instance of the NotificationEventDispatcherImpl. Must be called
19 // on the UI thread. 20 // on the UI thread.
20 static NotificationEventDispatcherImpl* GetInstance(); 21 static NotificationEventDispatcherImpl* GetInstance();
21 22
22 // NotificationEventDispatcher implementation. 23 // NotificationEventDispatcher implementation.
23 void DispatchNotificationClickEvent( 24 void DispatchNotificationClickEvent(
24 BrowserContext* browser_context, 25 BrowserContext* browser_context,
25 int64_t persistent_notification_id, 26 int64_t persistent_notification_id,
26 const GURL& origin, 27 const GURL& origin,
27 int action_index, 28 int action_index,
28 const NotificationClickDispatchCompleteCallback& 29 const NotificationDispatchCompleteCallback& dispatch_complete_callback)
29 dispatch_complete_callback) override; 30 override;
31 void DispatchNotificationCloseEvent(
32 BrowserContext* browser_context,
33 int64_t persistent_notification_id,
34 const GURL& origin,
35 bool by_user,
36 const NotificationDispatchCompleteCallback& dispatch_complete_callback)
37 override;
30 38
31 private: 39 private:
32 NotificationEventDispatcherImpl(); 40 NotificationEventDispatcherImpl();
33 ~NotificationEventDispatcherImpl() override; 41 ~NotificationEventDispatcherImpl() override;
34 42
35 friend struct base::DefaultSingletonTraits<NotificationEventDispatcherImpl>; 43 friend struct base::DefaultSingletonTraits<NotificationEventDispatcherImpl>;
36 44
37 DISALLOW_COPY_AND_ASSIGN(NotificationEventDispatcherImpl); 45 DISALLOW_COPY_AND_ASSIGN(NotificationEventDispatcherImpl);
38 }; 46 };
39 47
40 } // namespace content 48 } // namespace content
41 49
42 #endif // CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_ 50 #endif // CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698