| 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 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 30 matching lines...) Expand all Loading... |
| 41 { | 41 { |
| 42 // FIXME: Chromium should handle this, possibly using | 42 // FIXME: Chromium should handle this, possibly using |
| 43 // MIMETypeRegistry::isSupportedEncryptedMediaMIMEType(). | 43 // MIMETypeRegistry::isSupportedEncryptedMediaMIMEType(). |
| 44 notImplemented(); | 44 notImplemented(); |
| 45 return keySystem == "org.w3.clearkey"; | 45 return keySystem == "org.w3.clearkey"; |
| 46 } | 46 } |
| 47 | 47 |
| 48 PassOwnPtr<ContentDecryptionModule> ContentDecryptionModule::create(const String
& keySystem) | 48 PassOwnPtr<ContentDecryptionModule> ContentDecryptionModule::create(const String
& keySystem) |
| 49 { | 49 { |
| 50 ASSERT(!keySystem.isEmpty()); | 50 ASSERT(!keySystem.isEmpty()); |
| 51 OwnPtr<WebKit::WebContentDecryptionModule> cdm = adoptPtr(WebKit::Platform::
current()->createContentDecryptionModule(keySystem)); | 51 OwnPtr<blink::WebContentDecryptionModule> cdm = adoptPtr(blink::Platform::cu
rrent()->createContentDecryptionModule(keySystem)); |
| 52 if (!cdm) | 52 if (!cdm) |
| 53 return nullptr; | 53 return nullptr; |
| 54 return adoptPtr(new ContentDecryptionModule(cdm.release())); | 54 return adoptPtr(new ContentDecryptionModule(cdm.release())); |
| 55 } | 55 } |
| 56 | 56 |
| 57 ContentDecryptionModule::ContentDecryptionModule(PassOwnPtr<WebKit::WebContentDe
cryptionModule> cdm) | 57 ContentDecryptionModule::ContentDecryptionModule(PassOwnPtr<blink::WebContentDec
ryptionModule> cdm) |
| 58 : m_cdm(cdm) | 58 : m_cdm(cdm) |
| 59 { | 59 { |
| 60 ASSERT(m_cdm); | 60 ASSERT(m_cdm); |
| 61 } | 61 } |
| 62 | 62 |
| 63 ContentDecryptionModule::~ContentDecryptionModule() | 63 ContentDecryptionModule::~ContentDecryptionModule() |
| 64 { | 64 { |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool ContentDecryptionModule::supportsMIMEType(const String& mimeType) | 67 bool ContentDecryptionModule::supportsMIMEType(const String& mimeType) |
| 68 { | 68 { |
| 69 // FIXME: Chromium should handle this, possibly using | 69 // FIXME: Chromium should handle this, possibly using |
| 70 // MIMETypeRegistry::isSupportedEncryptedMediaMIMEType(). | 70 // MIMETypeRegistry::isSupportedEncryptedMediaMIMEType(). |
| 71 notImplemented(); | 71 notImplemented(); |
| 72 return mimeType == "video/webm"; | 72 return mimeType == "video/webm"; |
| 73 } | 73 } |
| 74 | 74 |
| 75 PassOwnPtr<ContentDecryptionModuleSession> ContentDecryptionModule::createSessio
n(ContentDecryptionModuleSessionClient* client) | 75 PassOwnPtr<ContentDecryptionModuleSession> ContentDecryptionModule::createSessio
n(ContentDecryptionModuleSessionClient* client) |
| 76 { | 76 { |
| 77 return adoptPtr(new ContentDecryptionModuleSession(m_cdm.get(), client)); | 77 return adoptPtr(new ContentDecryptionModuleSession(m_cdm.get(), client)); |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace WebCore | 80 } // namespace WebCore |
| OLD | NEW |