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

Unified Diff: third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackAvailability.h

Issue 2038573002: [Android, RemotePlayback] Make RemotePlayback classes ActiveScriptWrappable's (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't observe execution context, just return the element's document. Created 4 years, 6 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/remoteplayback/RemotePlaybackAvailability.h
diff --git a/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackAvailability.h b/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackAvailability.h
index 8108671759418b0a345e22d04dde2af6a13b30e5..ac083a52be10f8d2afcb13e99d2d4823c85cba67 100644
--- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackAvailability.h
+++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlaybackAvailability.h
@@ -5,6 +5,7 @@
#ifndef RemotePlaybackAvailability_h
#define RemotePlaybackAvailability_h
+#include "bindings/core/v8/ActiveScriptWrappable.h"
#include "core/dom/ContextLifecycleObserver.h"
#include "core/events/EventTarget.h"
@@ -16,7 +17,10 @@ class ScriptPromiseResolver;
// Expose whether there is a remote playback device available for a media
// element. The object will be initialized with a default value passed via
// ::take() and will then listen to availability changes.
-class RemotePlaybackAvailability final : public EventTargetWithInlineData, public ContextLifecycleObserver {
+class RemotePlaybackAvailability final
+ : public EventTargetWithInlineData
+ , public ActiveScriptWrappable
+ , public ContextLifecycleObserver {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(RemotePlaybackAvailability);
public:
@@ -31,6 +35,9 @@ public:
bool value() const;
+ // ActiveScriptWrappable implementation.
+ bool hasPendingActivity() const final;
+
DEFINE_ATTRIBUTE_EVENT_LISTENER(change);
DECLARE_VIRTUAL_TRACE();

Powered by Google App Engine
This is Rietveld 408576698