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

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

Issue 2782373002: Remove MediaControls methods needed for the Cast button (Closed)
Patch Set: Fixed MediaControlsImplTest Created 3 years, 8 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 4b328004ab74680e393cdf0dbacfdb852607dd2a..7daca70266aea1266473a7d0871d9637772d34d5 100644
--- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
+++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
@@ -21,6 +21,7 @@
namespace blink {
+class AvailabilityCallbackWrapper;
class HTMLMediaElement;
class RemotePlaybackAvailabilityCallback;
class ScriptPromiseResolver;
@@ -63,6 +64,21 @@ class MODULES_EXPORT RemotePlayback final
String state() const;
+ // The implementation of prompt(). Used by the native remote playback button.
+ void PromptInternal();
+
+ // The implementation of watchAvailability() and cancelWatchAvailability().
+ int WatchAvailabilityInternal(AvailabilityCallbackWrapper*);
+ bool CancelWatchAvailabilityInternal(int id);
+
+ WebRemotePlaybackState GetState() const { return state_; }
+
+ // WebRemotePlaybackClient implementation.
+ void StateChanged(WebRemotePlaybackState) override;
+ void AvailabilityChanged(WebRemotePlaybackAvailability) override;
+ void PromptCancelled() override;
+ bool RemotePlaybackAvailable() const override;
+
// ScriptWrappable implementation.
bool HasPendingActivity() const final;
@@ -76,6 +92,7 @@ class MODULES_EXPORT RemotePlayback final
private:
friend class V8RemotePlayback;
friend class RemotePlaybackTest;
+ friend class MediaControlsImplTest;
explicit RemotePlayback(HTMLMediaElement&);
@@ -83,15 +100,9 @@ class MODULES_EXPORT RemotePlayback final
// Need a void() method to post it as a task.
void NotifyInitialAvailability(int callback_id);
- // WebRemotePlaybackClient implementation.
- void StateChanged(WebRemotePlaybackState) override;
- void AvailabilityChanged(WebRemotePlaybackAvailability) override;
- void PromptCancelled() override;
- bool RemotePlaybackAvailable() const override;
-
WebRemotePlaybackState state_;
WebRemotePlaybackAvailability availability_;
- HeapHashMap<int, TraceWrapperMember<RemotePlaybackAvailabilityCallback>>
+ HeapHashMap<int, TraceWrapperMember<AvailabilityCallbackWrapper>>
availability_callbacks_;
Member<HTMLMediaElement> media_element_;
Member<ScriptPromiseResolver> prompt_promise_resolver_;

Powered by Google App Engine
This is Rietveld 408576698