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

Side by Side Diff: Source/platform/drm/ContentDecryptionModuleSession.h

Issue 124253003: Update MediaKeySession events to match latest EME spec (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename javascript Created 6 years, 11 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
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class WebContentDecryptionModule; 42 class WebContentDecryptionModule;
43 } 43 }
44 44
45 namespace WebCore { 45 namespace WebCore {
46 46
47 class KURL; 47 class KURL;
48 48
49 class PLATFORM_EXPORT ContentDecryptionModuleSessionClient { 49 class PLATFORM_EXPORT ContentDecryptionModuleSessionClient {
50 public: 50 public:
51 enum MediaKeyErrorCode { UnknownError = 1, ClientError }; 51 enum MediaKeyErrorCode { UnknownError = 1, ClientError };
52 virtual void keyAdded() = 0; 52 virtual void message(const unsigned char* message, size_t messageLength, con st KURL& destinationURL) = 0;
53 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) = 0; 53 virtual void ready() = 0;
54 virtual void keyMessage(const unsigned char* message, size_t messageLength, const KURL& destinationURL) = 0; 54 virtual void close() = 0;
55 virtual void error(MediaKeyErrorCode, unsigned long systemCode) = 0;
55 }; 56 };
56 57
57 class PLATFORM_EXPORT ContentDecryptionModuleSession : private blink::WebContent DecryptionModuleSession::Client { 58 class PLATFORM_EXPORT ContentDecryptionModuleSession : private blink::WebContent DecryptionModuleSession::Client {
58 WTF_MAKE_NONCOPYABLE(ContentDecryptionModuleSession); 59 WTF_MAKE_NONCOPYABLE(ContentDecryptionModuleSession);
59 public: 60 public:
60 static PassOwnPtr<ContentDecryptionModuleSession> create(ContentDecryptionMo duleSessionClient*); 61 static PassOwnPtr<ContentDecryptionModuleSession> create(ContentDecryptionMo duleSessionClient*);
61 62
62 ContentDecryptionModuleSession(blink::WebContentDecryptionModule*, ContentDe cryptionModuleSessionClient*); 63 ContentDecryptionModuleSession(blink::WebContentDecryptionModule*, ContentDe cryptionModuleSessionClient*);
63 ~ContentDecryptionModuleSession(); 64 ~ContentDecryptionModuleSession();
64 65
65 String sessionId() const; 66 String sessionId() const;
66 void initializeNewSession(const String& mimeType, const Uint8Array& initData ); 67 void initializeNewSession(const String& mimeType, const Uint8Array& initData );
67 void update(const Uint8Array& response); 68 void update(const Uint8Array& response);
68 void release(); 69 void release();
69 70
70 private: 71 private:
71 // blink::WebContentDecryptionModuleSession::Client 72 // blink::WebContentDecryptionModuleSession::Client
72 virtual void keyAdded() OVERRIDE; 73 virtual void message(const unsigned char* message, size_t messageLength, con st blink::WebURL& destinationURL) OVERRIDE;
73 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE; 74 virtual void ready() OVERRIDE;
74 virtual void keyMessage(const unsigned char* message, size_t messageLength, const blink::WebURL& destinationURL) OVERRIDE; 75 virtual void close() OVERRIDE;
76 virtual void error(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE;
75 77
76 OwnPtr<blink::WebContentDecryptionModuleSession> m_session; 78 OwnPtr<blink::WebContentDecryptionModuleSession> m_session;
77 79
78 ContentDecryptionModuleSessionClient* m_client; 80 ContentDecryptionModuleSessionClient* m_client;
79 }; 81 };
80 82
81 } // namespace WebCore 83 } // namespace WebCore
82 84
83 #endif // ContentDecryptionModuleSession_h 85 #endif // ContentDecryptionModuleSession_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698