OLD | NEW |
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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "config.h" | 25 #include "config.h" |
26 #include "public/platform/WebContentDecryptionModuleSession.h" | 26 #include "public/platform/WebContentDecryptionModuleSession.h" |
27 #include "public/platform/WebString.h" | 27 #include "public/platform/WebString.h" |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 WebContentDecryptionModuleSession::~WebContentDecryptionModuleSession() | 31 WebContentDecryptionModuleSession::~WebContentDecryptionModuleSession() |
32 { | 32 { |
33 } | 33 } |
34 | 34 |
| 35 // FIXME: remove once Chromium overrides this method. |
| 36 void WebContentDecryptionModuleSession::initializeNewSession(WebEncryptedMediaIn
itDataType initDataType, const unsigned char* initData, size_t initDataLength, W
ebEncryptedMediaSessionType sessionType, WebContentDecryptionModuleResult result
) |
| 37 { |
| 38 WebString initDataTypeString; |
| 39 switch (initDataType) { |
| 40 case WebEncryptedMediaInitDataType::Cenc: |
| 41 initDataTypeString = "cenc"; |
| 42 break; |
| 43 case WebEncryptedMediaInitDataType::Keyids: |
| 44 initDataTypeString = "keyids"; |
| 45 break; |
| 46 case WebEncryptedMediaInitDataType::Webm: |
| 47 initDataTypeString = "webm"; |
| 48 break; |
| 49 case WebEncryptedMediaInitDataType::Unknown: |
| 50 ASSERT_NOT_REACHED(); |
| 51 initDataTypeString = WebString(); |
| 52 break; |
| 53 } |
| 54 |
| 55 WebString sessionTypeString; |
| 56 switch (sessionType) { |
| 57 case WebEncryptedMediaSessionType::Temporary: |
| 58 sessionTypeString = "temporary"; |
| 59 break; |
| 60 case WebEncryptedMediaSessionType::PersistentLicense: |
| 61 sessionTypeString = "persistent-license"; |
| 62 break; |
| 63 case WebEncryptedMediaSessionType::PersistentReleaseMessage: |
| 64 sessionTypeString = "persistent-release-message"; |
| 65 break; |
| 66 case WebEncryptedMediaSessionType::Unknown: |
| 67 sessionTypeString = WebString(); |
| 68 break; |
| 69 } |
| 70 |
| 71 initializeNewSession(initDataTypeString, initData, initDataLength, sessionTy
peString, result); |
| 72 } |
| 73 |
35 WebContentDecryptionModuleSession::Client::~Client() | 74 WebContentDecryptionModuleSession::Client::~Client() |
36 { | 75 { |
37 } | 76 } |
38 | 77 |
39 } // namespace blink | 78 } // namespace blink |
OLD | NEW |