Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Side by Side Diff: third_party/WebKit/Source/modules/mediasession/MediaSession.h

Issue 1415923003: Introduce WebMediaSession (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/ScriptPromise.h"
8 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "modules/ModulesExport.h"
9 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "public/platform/modules/mediasession/WebMediaSession.h"
13 #include "wtf/OwnPtr.h"
10 14
11 namespace blink { 15 namespace blink {
12 16
13 class MediaSession : public GarbageCollected<MediaSession>, public ScriptWrappab le { 17 class ScriptState;
18
19 class MODULES_EXPORT MediaSession
20 : public GarbageCollectedFinalized<MediaSession>
21 , public ScriptWrappable {
14 DEFINE_WRAPPERTYPEINFO(); 22 DEFINE_WRAPPERTYPEINFO();
15 public: 23 public:
16 static MediaSession* create(); 24 static MediaSession* create(ExecutionContext*, ExceptionState&);
17 25
18 void activate(); 26 ScriptPromise activate(ScriptState*);
19 void deactivate(); 27 ScriptPromise deactivate(ScriptState*);
20 28
21 DEFINE_INLINE_TRACE() { } 29 DEFINE_INLINE_TRACE() { }
22 30
23 private: 31 private:
24 MediaSession() = default; 32 friend class MediaSessionTest;
33
34 explicit MediaSession(PassOwnPtr<WebMediaSession>);
35
36 OwnPtr<WebMediaSession> m_webMediaSession;
25 }; 37 };
26 38
27 } // namespace blink 39 } // namespace blink
28 40
29 #endif // MediaSession_h 41 #endif // MediaSession_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698