Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/blink/null_encrypted_media_player_support.h" | 5 #include "media/blink/null_encrypted_media_player_support.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | |
| 7 #include "third_party/WebKit/public/platform/WebContentDecryptionModule.h" | 8 #include "third_party/WebKit/public/platform/WebContentDecryptionModule.h" |
| 8 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" | 9 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" |
| 9 | 10 |
| 10 namespace media { | 11 namespace media { |
| 11 | 12 |
| 13 static void NeedKeyHandler(const std::string& type, | |
|
jamesr
2014/10/16 18:24:01
i think instead of static putting this in a anonym
DaleCurtis
2014/10/16 18:29:50
media code typically prefers the static prefix to
| |
| 14 const std::vector<uint8>& init_data) { | |
| 15 NOTIMPLEMENTED(); | |
| 16 } | |
| 17 | |
| 12 scoped_ptr<EncryptedMediaPlayerSupport> | 18 scoped_ptr<EncryptedMediaPlayerSupport> |
| 13 NullEncryptedMediaPlayerSupport::Create(blink::WebMediaPlayerClient* client) { | 19 NullEncryptedMediaPlayerSupport::Create(blink::WebMediaPlayerClient* client) { |
| 14 return scoped_ptr<EncryptedMediaPlayerSupport>( | 20 return scoped_ptr<EncryptedMediaPlayerSupport>( |
| 15 new NullEncryptedMediaPlayerSupport()); | 21 new NullEncryptedMediaPlayerSupport()); |
| 16 } | 22 } |
| 17 | 23 |
| 18 NullEncryptedMediaPlayerSupport::NullEncryptedMediaPlayerSupport() { | 24 NullEncryptedMediaPlayerSupport::NullEncryptedMediaPlayerSupport() { |
| 19 } | 25 } |
| 20 | 26 |
| 21 NullEncryptedMediaPlayerSupport::~NullEncryptedMediaPlayerSupport() { | 27 NullEncryptedMediaPlayerSupport::~NullEncryptedMediaPlayerSupport() { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 void NullEncryptedMediaPlayerSupport::SetContentDecryptionModule( | 65 void NullEncryptedMediaPlayerSupport::SetContentDecryptionModule( |
| 60 blink::WebContentDecryptionModule* cdm, | 66 blink::WebContentDecryptionModule* cdm, |
| 61 blink::WebContentDecryptionModuleResult result) { | 67 blink::WebContentDecryptionModuleResult result) { |
| 62 result.completeWithError( | 68 result.completeWithError( |
| 63 blink::WebContentDecryptionModuleExceptionNotSupportedError, | 69 blink::WebContentDecryptionModuleExceptionNotSupportedError, |
| 64 0, | 70 0, |
| 65 "Null MediaKeys object is not supported."); | 71 "Null MediaKeys object is not supported."); |
| 66 } | 72 } |
| 67 | 73 |
| 68 Demuxer::NeedKeyCB NullEncryptedMediaPlayerSupport::CreateNeedKeyCB() { | 74 Demuxer::NeedKeyCB NullEncryptedMediaPlayerSupport::CreateNeedKeyCB() { |
| 69 return Demuxer::NeedKeyCB(); | 75 return base::Bind(&NeedKeyHandler); |
| 70 } | 76 } |
| 71 | 77 |
| 72 SetDecryptorReadyCB | 78 SetDecryptorReadyCB |
| 73 NullEncryptedMediaPlayerSupport::CreateSetDecryptorReadyCB() { | 79 NullEncryptedMediaPlayerSupport::CreateSetDecryptorReadyCB() { |
| 74 return SetDecryptorReadyCB(); | 80 return SetDecryptorReadyCB(); |
| 75 } | 81 } |
| 76 | 82 |
| 77 void NullEncryptedMediaPlayerSupport::OnPipelineDecryptError() { | 83 void NullEncryptedMediaPlayerSupport::OnPipelineDecryptError() { |
| 78 } | 84 } |
| 79 | 85 |
| 80 } // namespace media | 86 } // namespace media |
| OLD | NEW |