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

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

Issue 1412933005: Revert of 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"
9 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "modules/ModulesExport.h"
11 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
12 #include "public/platform/modules/mediasession/WebMediaSession.h"
13 #include "wtf/OwnPtr.h"
14 10
15 namespace blink { 11 namespace blink {
16 12
17 class ScriptState; 13 class MediaSession : public GarbageCollected<MediaSession>, public ScriptWrappab le {
18
19 class MODULES_EXPORT MediaSession
20 : public GarbageCollectedFinalized<MediaSession>
21 , public ScriptWrappable {
22 DEFINE_WRAPPERTYPEINFO(); 14 DEFINE_WRAPPERTYPEINFO();
23 public: 15 public:
24 static MediaSession* create(ExecutionContext*, ExceptionState&); 16 static MediaSession* create();
25 17
26 ScriptPromise activate(ScriptState*); 18 void activate();
27 ScriptPromise deactivate(ScriptState*); 19 void deactivate();
28 20
29 DEFINE_INLINE_TRACE() { } 21 DEFINE_INLINE_TRACE() { }
30 22
31 private: 23 private:
32 friend class MediaSessionTest; 24 MediaSession() = default;
33
34 explicit MediaSession(PassOwnPtr<WebMediaSession>);
35
36 OwnPtr<WebMediaSession> m_webMediaSession;
37 }; 25 };
38 26
39 } // namespace blink 27 } // namespace blink
40 28
41 #endif // MediaSession_h 29 #endif // MediaSession_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698