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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebInbandTextTrack_h 31 #ifndef WebCDMSession_h
32 #define WebInbandTextTrack_h 32 #define WebCDMSession_h
33 33
34 namespace WebKit { 34 namespace WebKit {
35 35
36 class WebString; 36 class WebString;
37 class WebInbandTextTrackClient; 37 class WebURL;
38 38
39 class WebInbandTextTrack { 39 // Abstract interface to the Chromium CDM Session.
40
41 class WebCDMSession {
40 public: 42 public:
41 enum Kind { 43 class Client {
ddorwin 2013/06/06 23:29:50 Should we prefer [un]nested client classes?
42 KindSubtitles, 44 public:
43 KindCaptions, 45 enum MediaKeyErrorCode {
44 KindDescriptions, 46 MediaKeyErrorCodeUnknown = 1,
45 KindChapters, 47 MediaKeyErrorCodeClient,
46 KindMetadata, 48 };
47 KindNone 49
50 virtual void keyAdded() = 0;
51 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) = 0;
52 virtual void keyMessage(const unsigned char* message, unsigned messageLe ngth, const WebKit::WebURL& destinationURL) = 0;
53
54 protected:
55 virtual ~Client() { }
48 }; 56 };
49 57
50 enum Mode { 58 virtual ~WebCDMSession() { }
51 ModeDisabled,
52 ModeHidden,
53 ModeShowing
54 };
55 59
56 virtual ~WebInbandTextTrack() {} 60 virtual const WebString& sessionId() const = 0;
57 61 virtual void generateKeyRequest(const WebString& mimeType, const unsigned ch ar* initData, unsigned initDataLength) = 0;
58 virtual void setClient(WebInbandTextTrackClient*) = 0; 62 virtual void update(const unsigned char* key, unsigned keyLength) = 0;
59 virtual WebInbandTextTrackClient* client() = 0; 63 virtual void close() = 0;
60
61 virtual void setMode(Mode) = 0;
62 virtual Mode mode() const = 0;
63
64 virtual Kind kind() const = 0;
65 virtual bool isClosedCaptions() const = 0;
66
67 virtual WebString label() const = 0;
68 virtual WebString language() const = 0;
69 virtual bool isDefault() const = 0;
70
71 virtual int textTrackIndex() const = 0;
72 }; 64 };
73 65
74 } // namespace WebKit 66 } // namespace WebKit
75 67
76 #endif 68 #endif // WebCDMSession_h
OLDNEW
« 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