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

Unified Diff: public/platform/WebMediaPlayer.h

Issue 1188713004: Add setSinkId method to WebMediaPlayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebMediaPlayer.h
diff --git a/public/platform/WebMediaPlayer.h b/public/platform/WebMediaPlayer.h
index c18942a62fa8b5e4f2cb09fd4c8f45348bed0861..8231f006524bed6f56c21f2fb43001c81605121e 100644
--- a/public/platform/WebMediaPlayer.h
+++ b/public/platform/WebMediaPlayer.h
@@ -31,9 +31,11 @@
#ifndef WebMediaPlayer_h
#define WebMediaPlayer_h
+#include "WebCallbacks.h"
#include "WebCanvas.h"
#include "WebContentDecryptionModule.h"
#include "WebMediaSource.h"
+#include "WebSetSinkIdError.h"
#include "WebString.h"
#include "WebTimeRange.h"
#include "third_party/skia/include/core/SkXfermode.h"
@@ -108,12 +110,23 @@ public:
virtual void seek(double seconds) = 0;
virtual void setRate(double) = 0;
virtual void setVolume(double) = 0;
+
virtual void requestRemotePlayback() { };
virtual void requestRemotePlaybackControl() { };
virtual void setPreload(Preload) { };
virtual WebTimeRanges buffered() const = 0;
virtual WebTimeRanges seekable() const = 0;
+ // Attempts to switch the audio output device.
+ // Implementations of setSinkId take ownership of the WebCallbacks
+ // object, and the WebCallbacks object takes ownership of the returned
+ // error value, if any.
+ // Note also that setSinkId implementations must make sure that all
+ // methods of the WebCallbacks object, including constructors and
+ // destructors, run in the same thread where the object is created
+ // (i.e., the blink thread).
+ virtual void setSinkId(const WebString& deviceId, WebCallbacks<void, WebSetSinkIdError>*) = 0;
+
// True if the loaded media has a playable video/audio track.
virtual bool hasVideo() const = 0;
virtual bool hasAudio() const = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698