Chromium Code Reviews| Index: media/blink/webcontentdecryptionmoduleaccess_impl.cc |
| diff --git a/media/blink/webcontentdecryptionmoduleaccess_impl.cc b/media/blink/webcontentdecryptionmoduleaccess_impl.cc |
| index ab98b432058f8cff3981b761ef2072e61507df79..6c527bada2e1ccee8e0185ece344cc0a87184980 100644 |
| --- a/media/blink/webcontentdecryptionmoduleaccess_impl.cc |
| +++ b/media/blink/webcontentdecryptionmoduleaccess_impl.cc |
| @@ -15,6 +15,8 @@ namespace media { |
| // The caller owns the created cdm (passed back using |result|). |
| static void CreateCdm(const base::WeakPtr<WebEncryptedMediaClientImpl>& client, |
| const blink::WebString& key_system, |
| + bool allow_distinctive_identifier, |
| + bool allow_persistent_state, |
| const blink::WebSecurityOrigin& security_origin, |
| blink::WebContentDecryptionModuleResult result) { |
| // If |client| is gone (due to the frame getting destroyed), it is |
| @@ -26,7 +28,8 @@ static void CreateCdm(const base::WeakPtr<WebEncryptedMediaClientImpl>& client, |
| return; |
| } |
| - client->CreateCdm(key_system, security_origin, result); |
| + client->CreateCdm(key_system, allow_distinctive_identifier, |
| + allow_persistent_state, security_origin, result); |
| } |
| WebContentDecryptionModuleAccessImpl* |
| @@ -64,9 +67,16 @@ void WebContentDecryptionModuleAccessImpl::createContentDecryptionModule( |
| // As this object's lifetime is controlled by MediaKeySystemAccess on the |
| // blink side, copy all values needed by CreateCdm() in case the blink object |
| // gets garbage-collected. |
| + bool allow_distinctive_identifier = |
| + (configuration_.distinctiveIdentifier == |
| + blink::WebMediaKeySystemConfiguration::Requirement::Required); |
|
jrummell
2015/03/06 21:40:47
Should Requirement::Optional be allowed here? If i
sandersd (OOO until July 31)
2015/03/06 22:36:58
No, an accumulated configuration never has Optiona
ddorwin
2015/03/07 02:06:24
We could DCHECK != Optional before line 70. Up to
sandersd (OOO until July 31)
2015/03/09 20:01:35
Done.
|
| + bool allow_persistent_state = |
| + (configuration_.persistentState == |
| + blink::WebMediaKeySystemConfiguration::Requirement::Required); |
| base::MessageLoopProxy::current()->PostTask( |
| FROM_HERE, |
| - base::Bind(&CreateCdm, client_, key_system_, security_origin_, result)); |
| + base::Bind(&CreateCdm, client_, key_system_, allow_distinctive_identifier, |
| + allow_persistent_state, security_origin_, result)); |
| } |
| } // namespace media |