| 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
|
|
|