| Index: third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
|
| diff --git a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
|
| index 86c69e2d965117b42174b68a91101bc8e12f2349..4b4eeaee780473c6484b9d351a4c9ddfe1ded902 100644
|
| --- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
|
| +++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
|
| @@ -14,6 +14,7 @@
|
| #include "core/html/HTMLMediaElement.h"
|
| #include "modules/EventTargetModules.h"
|
| #include "platform/UserGestureIndicator.h"
|
| +#include "platform/heap/Heap.h"
|
|
|
| namespace blink {
|
|
|
| @@ -59,7 +60,8 @@ RemotePlayback::RemotePlayback(ScriptState* scriptState,
|
| ? WebRemotePlaybackState::Connected
|
| : WebRemotePlaybackState::Disconnected),
|
| m_availability(element.hasRemoteRoutes()),
|
| - m_mediaElement(&element) {}
|
| + m_mediaElement(&element),
|
| + m_isLowEndDevice(ProcessHeap::isLowEndDevice()) {}
|
|
|
| const AtomicString& RemotePlayback::interfaceName() const {
|
| return EventTargetNames::RemotePlayback;
|
| @@ -81,8 +83,13 @@ ScriptPromise RemotePlayback::watchAvailability(
|
| return promise;
|
| }
|
|
|
| - // TODO(avayvod): implement steps 4 and 5 of the algorithm.
|
| - // https://crbug.com/655233
|
| + if (m_isLowEndDevice) {
|
| + resolver->reject(DOMException::create(
|
| + NotSupportedError,
|
| + "Availability monitoring is not supported on this device."));
|
| + return promise;
|
| + }
|
| +
|
| int id;
|
| do {
|
| id = getExecutionContext()->circularSequentialID();
|
|
|