OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 NotificationManager_h | 5 #ifndef NotificationManager_h |
6 #define NotificationManager_h | 6 #define NotificationManager_h |
7 | 7 |
8 #include "core/dom/ContextLifecycleObserver.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
10 #include "public/platform/modules/notifications/notification_service.mojom-blink
.h" | 10 #include "public/platform/modules/notifications/notification_service.mojom-blink
.h" |
11 #include "wtf/Noncopyable.h" | 11 #include "wtf/Noncopyable.h" |
12 #include "wtf/text/WTFString.h" | 12 #include "wtf/text/WTFString.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 namespace mojom { | |
17 namespace blink { | |
18 enum class PermissionStatus; | |
19 } | |
20 } | |
21 | |
22 // The notification manager, unique to the execution context, is responsible for | 16 // The notification manager, unique to the execution context, is responsible for |
23 // connecting and communicating with the Mojo notification service. | 17 // connecting and communicating with the Mojo notification service. |
24 // | 18 // |
25 // TODO(peter): Make the NotificationManager responsible for resource loading. | 19 // TODO(peter): Make the NotificationManager responsible for resource loading. |
26 class NotificationManager final | 20 class NotificationManager final |
27 : public GarbageCollectedFinalized<NotificationManager> | 21 : public GarbageCollectedFinalized<NotificationManager> |
28 , public ContextLifecycleObserver | 22 , public ContextLifecycleObserver |
29 , public Supplement<ExecutionContext> { | 23 , public Supplement<ExecutionContext> { |
30 USING_GARBAGE_COLLECTED_MIXIN(NotificationManager); | 24 USING_GARBAGE_COLLECTED_MIXIN(NotificationManager); |
31 WTF_MAKE_NONCOPYABLE(NotificationManager); | 25 WTF_MAKE_NONCOPYABLE(NotificationManager); |
(...skipping 14 matching lines...) Expand all Loading... |
46 | 40 |
47 private: | 41 private: |
48 explicit NotificationManager(ExecutionContext*); | 42 explicit NotificationManager(ExecutionContext*); |
49 | 43 |
50 mojom::blink::NotificationServicePtr m_service; | 44 mojom::blink::NotificationServicePtr m_service; |
51 }; | 45 }; |
52 | 46 |
53 } // namespace blink | 47 } // namespace blink |
54 | 48 |
55 #endif // NotificationManager_h | 49 #endif // NotificationManager_h |
OLD | NEW |