OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NavigatorMediaSession_h |
| 6 #define NavigatorMediaSession_h |
| 7 |
| 8 #include "core/frame/Navigator.h" |
| 9 #include "modules/mediasession/MediaSession.h" |
| 10 #include "platform/Supplementable.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class Navigator; |
| 15 |
| 16 // Provides MediaSession as a supplement of Navigator as an attribute. |
| 17 class NavigatorMediaSession final |
| 18 : public GarbageCollected<NavigatorMediaSession>, |
| 19 public Supplement<Navigator> { |
| 20 USING_GARBAGE_COLLECTED_MIXIN(NavigatorMediaSession); |
| 21 |
| 22 public: |
| 23 static NavigatorMediaSession& from(Navigator&); |
| 24 static MediaSession* mediaSession(Navigator&); |
| 25 |
| 26 DECLARE_TRACE(); |
| 27 |
| 28 private: |
| 29 NavigatorMediaSession(Navigator&); |
| 30 static const char* supplementName(); |
| 31 |
| 32 // The MediaSession instance of this Navigator. |
| 33 Member<MediaSession> m_session; |
| 34 }; |
| 35 |
| 36 } // namespace blink |
| 37 |
| 38 #endif // NavigatorMediaSession_h |
OLD | NEW |