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

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

Issue 1259643002: NOT FOR LANDING Introduce and use WebMediaSession (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: hack until something works Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/FrameLoaderClient.h ('k') | Source/modules/mediasession/MediaSession.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "modules/ModulesExport.h"
9 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
11 #include "public/platform/WebMediaSession.h"
12 #include "wtf/OwnPtr.h"
10 13
11 namespace blink { 14 namespace blink {
12 15
13 class MediaSession : public GarbageCollected<MediaSession>, public ScriptWrappab le { 16 class ScriptState;
17 class WebMediaSession;
18
19 class MODULES_EXPORT MediaSession
whywhat 2015/08/24 14:30:03 Please, add some comments for the class and its (a
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(ScriptState*);
25 static MediaSession* createForTesting(PassOwnPtr<WebMediaSession>);
17 26
18 void activate(); 27 void activate();
19 void deactivate(); 28 void deactivate();
20 29
21 DEFINE_INLINE_TRACE() { } 30 DEFINE_INLINE_TRACE() { }
22 31
23 private: 32 private:
24 MediaSession() = default; 33 MediaSession(PassOwnPtr<WebMediaSession>);
whywhat 2015/08/24 14:30:03 nit: use explicit keyword
34
35 OwnPtr<WebMediaSession> m_webMediaSession;
whywhat 2015/08/24 14:30:03 Shouldn't this live on the Oilpan heap (e.g. be a
25 }; 36 };
26 37
27 } // namespace blink 38 } // namespace blink
28 39
29 #endif // MediaSession_h 40 #endif // MediaSession_h
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoaderClient.h ('k') | Source/modules/mediasession/MediaSession.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698