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..d2086b1c9d57a860033c0613938f536e86bb5429 100644 |
--- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h |
+++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h |
@@ -7,12 +7,12 @@ |
#include "bindings/core/v8/ActiveScriptWrappable.h" |
#include "bindings/core/v8/ScriptPromise.h" |
-#include "bindings/core/v8/TraceWrapperMember.h" |
#include "core/dom/ExecutionContext.h" |
#include "core/events/EventTarget.h" |
#include "modules/ModulesExport.h" |
#include "platform/heap/Handle.h" |
#include "platform/wtf/Compiler.h" |
+#include "platform/wtf/Functional.h" |
#include "platform/wtf/text/AtomicString.h" |
#include "platform/wtf/text/WTFString.h" |
#include "public/platform/modules/remoteplayback/WebRemotePlaybackAvailability.h" |
@@ -71,14 +71,21 @@ class MODULES_EXPORT RemotePlayback final |
DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); |
DECLARE_VIRTUAL_TRACE(); |
- DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
private: |
+ friend class MediaControlCastButtonElement; |
friend class V8RemotePlayback; |
friend class RemotePlaybackTest; |
explicit RemotePlayback(HTMLMediaElement&); |
+ // The implementation of prompt(). Used by the native remote playback button. |
+ void PromptInternal(); |
+ |
+ // The implementation of watchAvailability() and cancelWatchAvailability(). |
+ int WatchAvailabilityInternal(std::unique_ptr<WTF::Closure> callback); |
+ bool CancelWatchAvailabilityInternal(int id); |
+ |
// Calls the specified availability callback with the current availability. |
// Need a void() method to post it as a task. |
void NotifyInitialAvailability(int callback_id); |
@@ -91,8 +98,7 @@ class MODULES_EXPORT RemotePlayback final |
WebRemotePlaybackState state_; |
WebRemotePlaybackAvailability availability_; |
- HeapHashMap<int, TraceWrapperMember<RemotePlaybackAvailabilityCallback>> |
- availability_callbacks_; |
+ HeapHashMap<int, Member<AvailabilityCallback>> availability_callbacks_; |
Member<HTMLMediaElement> media_element_; |
Member<ScriptPromiseResolver> prompt_promise_resolver_; |
}; |