| OLD | NEW |
| 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_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ | 5 #ifndef CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ |
| 6 #define CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ | 6 #define CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <set> | 12 #include <set> |
| 13 #include <unordered_map> | 13 #include <unordered_map> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/id_map.h" | 16 #include "base/id_map.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "content/child/notifications/notification_dispatcher.h" | 19 #include "content/child/notifications/notification_dispatcher.h" |
| 20 #include "content/common/platform_notification_messages.h" | 20 #include "content/common/platform_notification_messages.h" |
| 21 #include "content/public/child/worker_thread.h" | 21 #include "content/public/child/worker_thread.h" |
| 22 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati
onManager.h" | 22 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati
onManager.h" |
| 23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 struct NotificationResources; | |
| 28 class ThreadSafeSender; | 27 class ThreadSafeSender; |
| 29 | 28 |
| 30 class NotificationManager : public blink::WebNotificationManager, | 29 class NotificationManager : public blink::WebNotificationManager, |
| 31 public WorkerThread::Observer { | 30 public WorkerThread::Observer { |
| 32 public: | 31 public: |
| 33 ~NotificationManager() override; | 32 ~NotificationManager() override; |
| 34 | 33 |
| 35 // |thread_safe_sender| and |notification_dispatcher| are used if | 34 // |thread_safe_sender| and |notification_dispatcher| are used if |
| 36 // calling this leads to construction. | 35 // calling this leads to construction. |
| 37 static NotificationManager* ThreadSpecificInstance( | 36 static NotificationManager* ThreadSpecificInstance( |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 104 |
| 106 // Map to store the delegate associated with a notification request Id. | 105 // Map to store the delegate associated with a notification request Id. |
| 107 std::unordered_map<int, ActiveNotificationData> active_page_notifications_; | 106 std::unordered_map<int, ActiveNotificationData> active_page_notifications_; |
| 108 | 107 |
| 109 DISALLOW_COPY_AND_ASSIGN(NotificationManager); | 108 DISALLOW_COPY_AND_ASSIGN(NotificationManager); |
| 110 }; | 109 }; |
| 111 | 110 |
| 112 } // namespace content | 111 } // namespace content |
| 113 | 112 |
| 114 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ | 113 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ |
| OLD | NEW |