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

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

Issue 1308983005: NOT FOR LANDING Implement WebMediaSession (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add forward declaration Created 4 years, 11 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/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include "public/platform/modules/mediasession/WebMediaSession.h" 12 #include "public/platform/modules/mediasession/WebMediaSession.h"
13 #include "wtf/OwnPtr.h" 13 #include "wtf/OwnPtr.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class MediaMetadata; 17 class MediaMetadata;
18 class ScriptState; 18 class ScriptState;
19 19
20 class MODULES_EXPORT MediaSession 20 class MODULES_EXPORT MediaSession
21 : public GarbageCollectedFinalized<MediaSession> 21 : public GarbageCollectedFinalized<MediaSession>
22 , public ScriptWrappable { 22 , public ScriptWrappable {
23 DEFINE_WRAPPERTYPEINFO(); 23 DEFINE_WRAPPERTYPEINFO();
24 public: 24 public:
25 static MediaSession* create(ExecutionContext*, ExceptionState&); 25 static MediaSession* create(ExecutionContext*, ExceptionState&);
26 26
27 WebMediaSession* webMediaSession() { return m_webMediaSession.get(); }
28
27 ScriptPromise activate(ScriptState*); 29 ScriptPromise activate(ScriptState*);
28 ScriptPromise deactivate(ScriptState*); 30 ScriptPromise deactivate(ScriptState*);
29 31
30 void setMetadata(MediaMetadata*); 32 void setMetadata(MediaMetadata*);
31 MediaMetadata* metadata() const; 33 MediaMetadata* metadata() const;
32 34
33 DECLARE_VIRTUAL_TRACE(); 35 DECLARE_VIRTUAL_TRACE();
34 36
35 private: 37 private:
36 friend class MediaSessionTest; 38 friend class MediaSessionTest;
37 39
38 explicit MediaSession(PassOwnPtr<WebMediaSession>); 40 explicit MediaSession(PassOwnPtr<WebMediaSession>);
39 41
40 OwnPtr<WebMediaSession> m_webMediaSession; 42 OwnPtr<WebMediaSession> m_webMediaSession;
41 Member<MediaMetadata> m_metadata; 43 Member<MediaMetadata> m_metadata;
42 }; 44 };
43 45
44 } // namespace blink 46 } // namespace blink
45 47
46 #endif // MediaSession_h 48 #endif // MediaSession_h
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_params.cc ('k') | third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698