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 #ifndef MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ |
| 6 #define MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 // CDM ID to be assigned to the next successfully initialized CDM. This ID is | 99 // CDM ID to be assigned to the next successfully initialized CDM. This ID is |
| 100 // unique per process. It will be used to locate the CDM by the media players | 100 // unique per process. It will be used to locate the CDM by the media players |
| 101 // living in the same process. | 101 // living in the same process. |
| 102 static int next_cdm_id_; | 102 static int next_cdm_id_; |
| 103 | 103 |
| 104 base::WeakPtr<MojoCdmServiceContext> context_; | 104 base::WeakPtr<MojoCdmServiceContext> context_; |
| 105 | 105 |
| 106 CdmFactory* cdm_factory_; | 106 CdmFactory* cdm_factory_; |
| 107 scoped_refptr<::media::ContentDecryptionModule> cdm_; | 107 scoped_refptr<::media::ContentDecryptionModule> cdm_; |
| 108 | 108 |
| 109 // MojoDecryptorService will be passed the Decryptor from |cdm_|, so | |
|
xhwang
2017/03/14 22:07:19
nit: "will be passed the Decryptor"?
jrummell
2017/03/14 22:49:40
Done.
| |
| 110 // |decryptor_| must not outlive |cdm_|. | |
| 109 std::unique_ptr<MojoDecryptorService> decryptor_; | 111 std::unique_ptr<MojoDecryptorService> decryptor_; |
| 110 | 112 |
| 111 // Set to a valid CDM ID if the |cdm_| is successfully created. | 113 // Set to a valid CDM ID if the |cdm_| is successfully created. |
| 112 int cdm_id_; | 114 int cdm_id_; |
| 113 | 115 |
| 114 mojom::ContentDecryptionModuleClientPtr client_; | 116 mojom::ContentDecryptionModuleClientPtr client_; |
| 115 | 117 |
| 116 base::WeakPtr<MojoCdmService> weak_this_; | 118 base::WeakPtr<MojoCdmService> weak_this_; |
| 117 base::WeakPtrFactory<MojoCdmService> weak_factory_; | 119 base::WeakPtrFactory<MojoCdmService> weak_factory_; |
| 118 | 120 |
| 119 DISALLOW_COPY_AND_ASSIGN(MojoCdmService); | 121 DISALLOW_COPY_AND_ASSIGN(MojoCdmService); |
| 120 }; | 122 }; |
| 121 | 123 |
| 122 } // namespace media | 124 } // namespace media |
| 123 | 125 |
| 124 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ | 126 #endif // MEDIA_MOJO_SERVICES_MOJO_CDM_SERVICE_H_ |
| OLD | NEW |