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

Unified Diff: public/platform/WebContentDecryptionModuleSession.h

Issue 16387015: Make unprefixed EME APIs use platform and Chromium. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: "unsigned" -> "size_t" for lengths 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/WebContentDecryptionModuleSession.h
diff --git a/public/webview/WebInbandTextTrack.h b/public/platform/WebContentDecryptionModuleSession.h
similarity index 61%
copy from public/webview/WebInbandTextTrack.h
copy to public/platform/WebContentDecryptionModuleSession.h
index cebdf20b8552aee6e4cc4977ebcf6cb7ebbc1e02..6791de5eaac03437640e11f2cc4ce2c19166cda1 100644
--- a/public/webview/WebInbandTextTrack.h
+++ b/public/platform/WebContentDecryptionModuleSession.h
@@ -28,49 +28,41 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebInbandTextTrack_h
-#define WebInbandTextTrack_h
+#ifndef WebContentDecryptionModuleSession_h
+#define WebContentDecryptionModuleSession_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 content decryption module session.
- virtual ~WebInbandTextTrack() {}
-
- virtual void setClient(WebInbandTextTrackClient*) = 0;
- virtual WebInbandTextTrackClient* client() = 0;
+class WebContentDecryptionModuleSession {
+public:
+ class Client {
+ 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, size_t 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 ~WebContentDecryptionModuleSession() { }
- virtual int textTrackIndex() const = 0;
+ virtual const WebString& sessionId() const = 0;
+ virtual void generateKeyRequest(const WebString& mimeType, const unsigned char* initData, size_t initDataLength) = 0;
+ virtual void update(const unsigned char* key, size_t keyLength) = 0;
+ virtual void close() = 0;
};
} // namespace WebKit
-#endif
+#endif // WebContentDecryptionModuleSession_h
« public/platform/WebContentDecryptionModule.h ('K') | « public/platform/WebContentDecryptionModule.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698