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; | 27 struct NotificationResources; |
28 struct PlatformNotificationData; | |
29 class ThreadSafeSender; | 28 class ThreadSafeSender; |
30 | 29 |
31 class NotificationManager : public blink::WebNotificationManager, | 30 class NotificationManager : public blink::WebNotificationManager, |
32 public WorkerThread::Observer { | 31 public WorkerThread::Observer { |
33 public: | 32 public: |
34 ~NotificationManager() override; | 33 ~NotificationManager() override; |
35 | 34 |
36 // |thread_safe_sender| and |notification_dispatcher| are used if | 35 // |thread_safe_sender| and |notification_dispatcher| are used if |
37 // calling this leads to construction. | 36 // calling this leads to construction. |
38 static NotificationManager* ThreadSpecificInstance( | 37 static NotificationManager* ThreadSpecificInstance( |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 105 |
107 // Map to store the delegate associated with a notification request Id. | 106 // Map to store the delegate associated with a notification request Id. |
108 std::unordered_map<int, ActiveNotificationData> active_page_notifications_; | 107 std::unordered_map<int, ActiveNotificationData> active_page_notifications_; |
109 | 108 |
110 DISALLOW_COPY_AND_ASSIGN(NotificationManager); | 109 DISALLOW_COPY_AND_ASSIGN(NotificationManager); |
111 }; | 110 }; |
112 | 111 |
113 } // namespace content | 112 } // namespace content |
114 | 113 |
115 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ | 114 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ |
OLD | NEW |