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

Side by Side Diff: public/platform/WebContentDecryptionModuleSession.h

Issue 124253003: Update MediaKeySession events to match latest EME spec (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 29 matching lines...) Expand all
40 40
41 class BLINK_PLATFORM_EXPORT WebContentDecryptionModuleSession { 41 class BLINK_PLATFORM_EXPORT WebContentDecryptionModuleSession {
42 public: 42 public:
43 class BLINK_PLATFORM_EXPORT Client { 43 class BLINK_PLATFORM_EXPORT Client {
44 public: 44 public:
45 enum MediaKeyErrorCode { 45 enum MediaKeyErrorCode {
46 MediaKeyErrorCodeUnknown = 1, 46 MediaKeyErrorCodeUnknown = 1,
47 MediaKeyErrorCodeClient, 47 MediaKeyErrorCodeClient,
48 }; 48 };
49 49
50 virtual void keyAdded() = 0;
51 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) = 0; 50 virtual void keyError(MediaKeyErrorCode, unsigned long systemCode) = 0;
52 virtual void keyMessage(const unsigned char* message, size_t messageLeng th, const blink::WebURL& destinationURL) = 0; 51 virtual void keyMessage(const unsigned char* message, size_t messageLeng th, const blink::WebURL& destinationURL) = 0;
52 virtual void keyReady() = 0;
53 virtual void keyClosed() = 0;
54
55 // FIXME: Remove when all callers change to using keyReady().
56 virtual void keyAdded() { keyReady(); }
53 57
54 protected: 58 protected:
55 virtual ~Client(); 59 virtual ~Client();
56 }; 60 };
57 61
58 virtual ~WebContentDecryptionModuleSession(); 62 virtual ~WebContentDecryptionModuleSession();
59 63
60 virtual WebString sessionId() const = 0; 64 virtual WebString sessionId() const = 0;
61 virtual void generateKeyRequest(const WebString& mimeType, const unsigned ch ar* initData, size_t initDataLength) = 0; 65 virtual void generateKeyRequest(const WebString& mimeType, const unsigned ch ar* initData, size_t initDataLength) = 0;
62 virtual void update(const unsigned char* key, size_t keyLength) = 0; 66 virtual void update(const unsigned char* key, size_t keyLength) = 0;
63 virtual void close() = 0; 67 virtual void close() = 0;
64 }; 68 };
65 69
66 } // namespace blink 70 } // namespace blink
67 71
68 #endif // WebContentDecryptionModuleSession_h 72 #endif // WebContentDecryptionModuleSession_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698