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

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

Issue 1441883003: Hook up RendererMediaSessionManager with browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comment from philipj: ActiveDOMObject Created 5 years 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 a10245044e0c75f9c7aab250b1de7ff9dc223fc5..2eee6d11086148e4e9615e0d8596bd2990fc7d5b 100644
--- a/third_party/WebKit/Source/modules/mediasession/MediaSession.h
+++ b/third_party/WebKit/Source/modules/mediasession/MediaSession.h
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/dom/ActiveDOMObject.h"
#include "modules/ModulesExport.h"
#include "platform/heap/Handle.h"
#include "public/platform/modules/mediasession/WebMediaSession.h"
@@ -18,7 +19,8 @@ class ScriptState;
class MODULES_EXPORT MediaSession
: public GarbageCollectedFinalized<MediaSession>
- , public ScriptWrappable {
+ , public ScriptWrappable
+ , public ActiveDOMObject {
mlamouri (slow - plz ping) 2015/12/07 18:14:53 If you make MediaSession an ActiveDOMObject, you m
davve 2015/12/08 10:21:23 Acknowledged.
DEFINE_WRAPPERTYPEINFO();
public:
static MediaSession* create(ExecutionContext*, ExceptionState&);
@@ -26,12 +28,15 @@ public:
ScriptPromise activate(ScriptState*);
ScriptPromise deactivate(ScriptState*);
+ // ActiveDOMObject functions.
+ bool hasPendingActivity() const override;
mlamouri (slow - plz ping) 2015/12/07 18:14:53 I'm not entirely convinced with this addition. Cal
davve 2015/12/08 10:21:23 I think it's an interesting idea and it matches be
philipj_slow 2015/12/08 10:38:45 Something like this should work, but the lifetime
davve 2015/12/09 11:20:18 I punted on this issue in ps#11 by not involving t
+
DEFINE_INLINE_TRACE() { }
private:
friend class MediaSessionTest;
- explicit MediaSession(PassOwnPtr<WebMediaSession>);
+ MediaSession(ExecutionContext*, PassOwnPtr<WebMediaSession>);
OwnPtr<WebMediaSession> m_webMediaSession;
};

Powered by Google App Engine
This is Rietveld 408576698