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

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

Issue 2475293003: [RemotePlayback] No monitoring on low-end devices (Closed)
Patch Set: Moved to Platform::initialize() 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.cpp
diff --git a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
index 7d1002114110eebb8703b1881be1284ac00ea58e..95db13e012064578e1867c8c0e97e24d9a007020 100644
--- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
+++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp
@@ -13,6 +13,7 @@
#include "core/events/Event.h"
#include "core/html/HTMLMediaElement.h"
#include "modules/EventTargetModules.h"
+#include "platform/MemoryCoordinator.h"
#include "platform/UserGestureIndicator.h"
namespace blink {
@@ -73,8 +74,13 @@ ScriptPromise RemotePlayback::watchAvailability(
return promise;
}
- // TODO(avayvod): implement steps 4 and 5 of the algorithm.
- // https://crbug.com/655233
+ if (MemoryCoordinator::isLowEndDevice()) {
+ resolver->reject(DOMException::create(
+ NotSupportedError,
+ "Availability monitoring is not supported on this device."));
+ return promise;
+ }
+
int id;
do {
id = getExecutionContext()->circularSequentialID();
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.idl ('k') | third_party/WebKit/Source/platform/MemoryCoordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698