OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_ |
| 7 |
| 8 #include "base/memory/singleton.h" |
| 9 #include "content/public/browser/notification_event_dispatcher.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class NotificationEventDispatcherImpl : public NotificationEventDispatcher { |
| 14 public: |
| 15 // Returns the instance of the NotificationEventDispatcherImpl. Must be called |
| 16 // on the UI thread. |
| 17 static NotificationEventDispatcherImpl* GetInstance(); |
| 18 |
| 19 // NotificationEventDispatcher implementation. |
| 20 void DispatchNotificationClickEvent( |
| 21 BrowserContext* browser_context, |
| 22 const GURL& origin, |
| 23 int64 service_worker_registration_id, |
| 24 const std::string& notification_id, |
| 25 const ShowDesktopNotificationHostMsgParams& notification_data, |
| 26 const NotificationClickDispatchCompleteCallback& callback) override; |
| 27 |
| 28 private: |
| 29 NotificationEventDispatcherImpl(); |
| 30 ~NotificationEventDispatcherImpl() override; |
| 31 |
| 32 friend struct DefaultSingletonTraits<NotificationEventDispatcherImpl>; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(NotificationEventDispatcherImpl); |
| 35 }; |
| 36 |
| 37 } // namespace content |
| 38 |
| 39 #endif // CONTENT_BROWSER_NOTIFICATIONS_NOTIFICATION_EVENT_DISPATCHER_IMPL_H_ |
OLD | NEW |