| 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 #ifndef MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ |
| 6 #define MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ | 6 #define MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 MediaPermission* media_permission); | 27 MediaPermission* media_permission); |
| 28 virtual ~WebEncryptedMediaClientImpl(); | 28 virtual ~WebEncryptedMediaClientImpl(); |
| 29 | 29 |
| 30 // WebEncryptedMediaClient implementation. | 30 // WebEncryptedMediaClient implementation. |
| 31 virtual void requestMediaKeySystemAccess( | 31 virtual void requestMediaKeySystemAccess( |
| 32 blink::WebEncryptedMediaRequest request); | 32 blink::WebEncryptedMediaRequest request); |
| 33 | 33 |
| 34 // Create the CDM for |key_system| and |security_origin|. The caller owns | 34 // Create the CDM for |key_system| and |security_origin|. The caller owns |
| 35 // the created cdm (passed back using |result|). | 35 // the created cdm (passed back using |result|). |
| 36 void CreateCdm(const blink::WebString& key_system, | 36 void CreateCdm(const blink::WebString& key_system, |
| 37 bool allow_distinctive_identifier, |
| 38 bool allow_persistent_state, |
| 37 const blink::WebSecurityOrigin& security_origin, | 39 const blink::WebSecurityOrigin& security_origin, |
| 38 blink::WebContentDecryptionModuleResult result); | 40 blink::WebContentDecryptionModuleResult result); |
| 39 | 41 |
| 40 private: | 42 private: |
| 41 // Pick a supported configuration if possible, and complete the request. This | 43 // Pick a supported configuration if possible, and complete the request. This |
| 42 // method may asynchronously invoke itself after prompting for permissions. | 44 // method may asynchronously invoke itself after prompting for permissions. |
| 43 void SelectSupportedConfiguration(blink::WebEncryptedMediaRequest request, | 45 void SelectSupportedConfiguration(blink::WebEncryptedMediaRequest request, |
| 44 bool was_permission_requested, | 46 bool was_permission_requested, |
| 45 bool is_permission_granted); | 47 bool is_permission_granted); |
| 46 | 48 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 60 | 62 |
| 61 scoped_ptr<CdmFactory> cdm_factory_; | 63 scoped_ptr<CdmFactory> cdm_factory_; |
| 62 MediaPermission* media_permission_; | 64 MediaPermission* media_permission_; |
| 63 | 65 |
| 64 base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_; | 66 base::WeakPtrFactory<WebEncryptedMediaClientImpl> weak_factory_; |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 } // namespace media | 69 } // namespace media |
| 68 | 70 |
| 69 #endif // MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ | 71 #endif // MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_ |
| OLD | NEW |