OLD | NEW |
---|---|
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 |
OLD | NEW |