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

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

Issue 2480003002: [RemotePlayback] Keep track of source compatibility and reject prompt() correspondingly (Closed)
Patch Set: Fixed failing tests Created 4 years, 1 month 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 d12c4da7cc8a72785eb432d9974f7fbc42e08f83..9022bbd162775a7ff5a340f69d0857aed5e0cacf 100644
--- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
+++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
@@ -28,7 +28,7 @@ class ScriptPromiseResolver;
class MODULES_EXPORT RemotePlayback final
: public EventTargetWithInlineData,
public ActiveScriptWrappable,
- WTF_NON_EXPORTED_BASE(private WebRemotePlaybackClient) {
+ WTF_NON_EXPORTED_BASE(public WebRemotePlaybackClient) {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(RemotePlayback);
@@ -83,8 +83,10 @@ class MODULES_EXPORT RemotePlayback final
// WebRemotePlaybackClient implementation.
void stateChanged(WebRemotePlaybackState) override;
- void availabilityChanged(bool available) override;
+ void availabilityChanged(bool isRouteAvailable,
+ bool isSourceCompatible) override;
void promptCancelled() override;
+ bool remotePlaybackAvailable() const override;
// Prevent v8 from garbage collecting the availability callbacks.
// TODO(avayvod): remove when crbug.com/468240 is fixed and the references
@@ -94,7 +96,8 @@ class MODULES_EXPORT RemotePlayback final
RefPtr<ScriptState> m_scriptState;
WebRemotePlaybackState m_state;
- bool m_availability;
+ bool m_routeAvailable;
+ bool m_sourceCompatible;
HeapHashMap<int, TraceWrapperMember<RemotePlaybackAvailabilityCallback>>
m_availabilityCallbacks;
Member<HTMLMediaElement> m_mediaElement;

Powered by Google App Engine
This is Rietveld 408576698