| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MediaSession_h | 5 #ifndef MediaSession_h |
| 6 #define MediaSession_h | 6 #define MediaSession_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/dom/ContextLifecycleObserver.h" | 9 #include "core/dom/ContextLifecycleObserver.h" |
| 10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
| 11 #include "modules/ModulesExport.h" | 11 #include "modules/ModulesExport.h" |
| 12 #include "mojo/public/cpp/bindings/binding.h" | 12 #include "mojo/public/cpp/bindings/binding.h" |
| 13 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 14 #include "public/platform/modules/mediasession/media_session.mojom-blink.h" | 14 #include "public/platform/modules/mediasession/media_session.mojom-blink.h" |
| 15 #include <memory> | 15 #include <memory> |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 class ExecutionContext; | 19 class ExecutionContext; |
| 20 class MediaMetadata; | 20 class MediaMetadata; |
| 21 | 21 |
| 22 class MODULES_EXPORT MediaSession final | 22 class MODULES_EXPORT MediaSession final |
| 23 : public EventTargetWithInlineData, | 23 : public EventTargetWithInlineData, |
| 24 public ContextLifecycleObserver, | 24 public ContextClient, |
| 25 blink::mojom::blink::MediaSessionClient { | 25 blink::mojom::blink::MediaSessionClient { |
| 26 USING_GARBAGE_COLLECTED_MIXIN(MediaSession); | 26 USING_GARBAGE_COLLECTED_MIXIN(MediaSession); |
| 27 DEFINE_WRAPPERTYPEINFO(); | 27 DEFINE_WRAPPERTYPEINFO(); |
| 28 USING_PRE_FINALIZER(MediaSession, dispose); | 28 USING_PRE_FINALIZER(MediaSession, dispose); |
| 29 | 29 |
| 30 public: | 30 public: |
| 31 static MediaSession* create(ExecutionContext*); | 31 static MediaSession* create(ExecutionContext*); |
| 32 | 32 |
| 33 void dispose(); | 33 void dispose(); |
| 34 | 34 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 mojom::blink::MediaSessionPlaybackState m_playbackState; | 78 mojom::blink::MediaSessionPlaybackState m_playbackState; |
| 79 Member<MediaMetadata> m_metadata; | 79 Member<MediaMetadata> m_metadata; |
| 80 mojom::blink::MediaSessionServicePtr m_service; | 80 mojom::blink::MediaSessionServicePtr m_service; |
| 81 mojo::Binding<blink::mojom::blink::MediaSessionClient> m_clientBinding; | 81 mojo::Binding<blink::mojom::blink::MediaSessionClient> m_clientBinding; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace blink | 84 } // namespace blink |
| 85 | 85 |
| 86 #endif // MediaSession_h | 86 #endif // MediaSession_h |
| OLD | NEW |