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

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

Issue 1827853002: [Android, RemotePlayback] Implement HTMLMediaElement.remote.connect(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-playback-availability
Patch Set: Created 4 years, 9 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/RemotePlayback.h
diff --git a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
index fa24f558fc5ac27779afcac8b4549c1b52f4e452..5b70a3875b0d141b00b8dff33fb84b2b0d686b38 100644
--- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
+++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
@@ -20,6 +20,7 @@ class ExecutionContext;
class HTMLMediaElement;
class LocalFrame;
class RemotePlaybackAvailability;
+class ScriptPromiseResolver;
class RemotePlayback final
: public RefCountedGarbageCollectedEventTargetWithInlineData<RemotePlayback>
@@ -38,6 +39,7 @@ public:
ExecutionContext* getExecutionContext() const override;
ScriptPromise getAvailability(ScriptState*);
+ ScriptPromise connect(ScriptState*);
String state() const;
@@ -46,14 +48,17 @@ public:
DECLARE_VIRTUAL_TRACE();
private:
- RemotePlayback(LocalFrame*, WebRemotePlaybackState, bool availability);
+ explicit RemotePlayback(HTMLMediaElement&);
void stateChanged(WebRemotePlaybackState) override;
void availabilityChanged(bool available) override;
+ void connectionResultReceived(bool success) override;
WebRemotePlaybackState m_state;
bool m_availability;
HeapVector<Member<RemotePlaybackAvailability>> m_availabilityObjects;
+ WeakPtrWillBeWeakMember<HTMLMediaElement> m_mediaElement;
+ HeapVector<Member<ScriptPromiseResolver>> m_connectPromiseResolvers;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698