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

Unified Diff: third_party/WebKit/Source/modules/mediasession/MediaSession.h

Issue 1370453002: Introduce WebMediaSession (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add virtual default destructor 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediasession/MediaSession.h
diff --git a/third_party/WebKit/Source/modules/mediasession/MediaSession.h b/third_party/WebKit/Source/modules/mediasession/MediaSession.h
index bb9ce15e275adb89d5a6c5759c1dcc1aa486de4d..a10245044e0c75f9c7aab250b1de7ff9dc223fc5 100644
--- a/third_party/WebKit/Source/modules/mediasession/MediaSession.h
+++ b/third_party/WebKit/Source/modules/mediasession/MediaSession.h
@@ -5,23 +5,35 @@
#ifndef MediaSession_h
#define MediaSession_h
+#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptWrappable.h"
+#include "modules/ModulesExport.h"
#include "platform/heap/Handle.h"
+#include "public/platform/modules/mediasession/WebMediaSession.h"
+#include "wtf/OwnPtr.h"
namespace blink {
-class MediaSession : public GarbageCollected<MediaSession>, public ScriptWrappable {
+class ScriptState;
+
+class MODULES_EXPORT MediaSession
+ : public GarbageCollectedFinalized<MediaSession>
+ , public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static MediaSession* create();
+ static MediaSession* create(ExecutionContext*, ExceptionState&);
- void activate();
- void deactivate();
+ ScriptPromise activate(ScriptState*);
+ ScriptPromise deactivate(ScriptState*);
DEFINE_INLINE_TRACE() { }
private:
- MediaSession() = default;
+ friend class MediaSessionTest;
+
+ explicit MediaSession(PassOwnPtr<WebMediaSession>);
+
+ OwnPtr<WebMediaSession> m_webMediaSession;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698