| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/cdm/ppapi/cdm_adapter.h" | 5 #include "media/cdm/ppapi/cdm_adapter.h" |
| 6 | 6 |
| 7 #include "media/base/limits.h" | 7 #include "media/base/limits.h" |
| 8 #include "media/cdm/ppapi/cdm_file_io_impl.h" | 8 #include "media/cdm/ppapi/cdm_file_io_impl.h" |
| 9 #include "media/cdm/ppapi/cdm_helpers.h" | 9 #include "media/cdm/ppapi/cdm_helpers.h" |
| 10 #include "media/cdm/ppapi/cdm_logging.h" | 10 #include "media/cdm/ppapi/cdm_logging.h" |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 } | 1187 } |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 // The CDM owns the returned object and must call FileIO::Close() to release it. | 1190 // The CDM owns the returned object and must call FileIO::Close() to release it. |
| 1191 cdm::FileIO* CdmAdapter::CreateFileIO(cdm::FileIOClient* client) { | 1191 cdm::FileIO* CdmAdapter::CreateFileIO(cdm::FileIOClient* client) { |
| 1192 return new CdmFileIOImpl(client, pp_instance()); | 1192 return new CdmFileIOImpl(client, pp_instance()); |
| 1193 } | 1193 } |
| 1194 | 1194 |
| 1195 #if defined(OS_CHROMEOS) | 1195 #if defined(OS_CHROMEOS) |
| 1196 void CdmAdapter::ReportOutputProtectionUMA(OutputProtectionStatus status) { | 1196 void CdmAdapter::ReportOutputProtectionUMA(OutputProtectionStatus status) { |
| 1197 pp::UMAPrivate uma_interface_(this); | 1197 pp::UMAPrivate uma_interface(this); |
| 1198 uma_interface_.HistogramEnumeration( | 1198 uma_interface.HistogramEnumeration( |
| 1199 "Media.EME.OutputProtection", status, OUTPUT_PROTECTION_MAX); | 1199 "Media.EME.OutputProtection", status, OUTPUT_PROTECTION_MAX); |
| 1200 } | 1200 } |
| 1201 | 1201 |
| 1202 void CdmAdapter::ReportOutputProtectionQuery() { | 1202 void CdmAdapter::ReportOutputProtectionQuery() { |
| 1203 if (uma_for_output_protection_query_reported_) | 1203 if (uma_for_output_protection_query_reported_) |
| 1204 return; | 1204 return; |
| 1205 | 1205 |
| 1206 ReportOutputProtectionUMA(OUTPUT_PROTECTION_QUERIED); | 1206 ReportOutputProtectionUMA(OUTPUT_PROTECTION_QUERIED); |
| 1207 uma_for_output_protection_query_reported_ = true; | 1207 uma_for_output_protection_query_reported_ = true; |
| 1208 } | 1208 } |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 } // namespace media | 1358 } // namespace media |
| 1359 | 1359 |
| 1360 namespace pp { | 1360 namespace pp { |
| 1361 | 1361 |
| 1362 // Factory function for your specialization of the Module object. | 1362 // Factory function for your specialization of the Module object. |
| 1363 Module* CreateModule() { | 1363 Module* CreateModule() { |
| 1364 return new media::CdmAdapterModule(); | 1364 return new media::CdmAdapterModule(); |
| 1365 } | 1365 } |
| 1366 | 1366 |
| 1367 } // namespace pp | 1367 } // namespace pp |
| OLD | NEW |