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

Unified Diff: public/platform/WebCDMSession.h

Issue 16387015: Make unprefixed EME APIs use platform and Chromium. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
Index: public/platform/WebCDMSession.h
diff --git a/public/webview/WebInbandTextTrack.h b/public/platform/WebCDMSession.h
similarity index 64%
copy from public/webview/WebInbandTextTrack.h
copy to public/platform/WebCDMSession.h
index cebdf20b8552aee6e4cc4977ebcf6cb7ebbc1e02..d172d03d282df24d1e305d78ccbd1bbeb70da606 100644
--- a/public/webview/WebInbandTextTrack.h
+++ b/public/platform/WebCDMSession.h
@@ -28,49 +28,41 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebInbandTextTrack_h
-#define WebInbandTextTrack_h
+#ifndef WebCDMSession_h
+#define WebCDMSession_h
namespace WebKit {
class WebString;
-class WebInbandTextTrackClient;
+class WebURL;
-class WebInbandTextTrack {
-public:
- enum Kind {
- KindSubtitles,
- KindCaptions,
- KindDescriptions,
- KindChapters,
- KindMetadata,
- KindNone
- };
-
- enum Mode {
- ModeDisabled,
- ModeHidden,
- ModeShowing
- };
+// Abstract interface to the Chromium CDM Session.
- virtual ~WebInbandTextTrack() {}
-
- virtual void setClient(WebInbandTextTrackClient*) = 0;
- virtual WebInbandTextTrackClient* client() = 0;
+class WebCDMSession {
+public:
+ class Client {
ddorwin 2013/06/06 23:29:50 Should we prefer [un]nested client classes?
+ public:
+ enum MediaKeyErrorCode {
+ MediaKeyErrorCodeUnknown = 1,
+ MediaKeyErrorCodeClient,
+ };
- virtual void setMode(Mode) = 0;
- virtual Mode mode() const = 0;
+ virtual void keyAdded() = 0;
+ virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) = 0;
+ virtual void keyMessage(const unsigned char* message, unsigned messageLength, const WebKit::WebURL& destinationURL) = 0;
- virtual Kind kind() const = 0;
- virtual bool isClosedCaptions() const = 0;
+ protected:
+ virtual ~Client() { }
+ };
- virtual WebString label() const = 0;
- virtual WebString language() const = 0;
- virtual bool isDefault() const = 0;
+ virtual ~WebCDMSession() { }
- virtual int textTrackIndex() const = 0;
+ virtual const WebString& sessionId() const = 0;
+ virtual void generateKeyRequest(const WebString& mimeType, const unsigned char* initData, unsigned initDataLength) = 0;
+ virtual void update(const unsigned char* key, unsigned keyLength) = 0;
+ virtual void close() = 0;
};
} // namespace WebKit
-#endif
+#endif // WebCDMSession_h
« Source/modules/encryptedmedia/MediaKeySession.h ('K') | « public/platform/WebCDM.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698