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

Unified Diff: third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js

Issue 2426653002: Adding mojo MediaSessionClient to support media controls (Closed)
Patch Set: rebased and nits Created 4 years, 2 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/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js
diff --git a/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js b/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js
index 833db371d64361a2c46db7508c08f616902aad6b..da5c96a6b5857f6334cafa13fc40e200bb31c9dc 100644
--- a/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js
+++ b/third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js
@@ -66,6 +66,34 @@ let mediaSessionServiceMock = loadMojoModules(
setMetadataCallback(callback) {
this.metadataCallback_ = callback;
}
+
+ enableAction(action) {
+ if (!!this.enableDisableActionCallback_)
+ this.enableDisableActionCallback_(action, true);
+ }
+
+ disableAction(action) {
+ if (!!this.enableDisableActionCallback_)
+ this.enableDisableActionCallback_(action, false);
+ }
+
+ setEnableDisableActionCallback(callback) {
+ this.enableDisableActionCallback_ = callback;
+ }
+
+ setClient(client) {
+ this.client_ = client;
+ if (!!this.clientCallback_)
+ this.clientCallback_();
+ }
+
+ setClientCallback(callback) {
+ this.clientCallback_ = callback;
+ }
+
+ getClient() {
+ return this.client_;
+ }
}
return new MediaSessionServiceMock(mojo.frameInterfaces);

Powered by Google App Engine
This is Rietveld 408576698