OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/pepper/content_decryptor_delegate.h" | 5 #include "content/renderer/pepper/content_decryptor_delegate.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/metrics/sparse_histogram.h" | 8 #include "base/metrics/sparse_histogram.h" |
9 #include "base/numerics/safe_conversions.h" | 9 #include "base/numerics/safe_conversions.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 case PP_CDMKEYSTATUS_INVALID: | 315 case PP_CDMKEYSTATUS_INVALID: |
316 return media::CdmKeyInformation::INTERNAL_ERROR; | 316 return media::CdmKeyInformation::INTERNAL_ERROR; |
317 case PP_CDMKEYSTATUS_EXPIRED: | 317 case PP_CDMKEYSTATUS_EXPIRED: |
318 return media::CdmKeyInformation::EXPIRED; | 318 return media::CdmKeyInformation::EXPIRED; |
319 case PP_CDMKEYSTATUS_OUTPUTRESTRICTED: | 319 case PP_CDMKEYSTATUS_OUTPUTRESTRICTED: |
320 return media::CdmKeyInformation::OUTPUT_RESTRICTED; | 320 return media::CdmKeyInformation::OUTPUT_RESTRICTED; |
321 case PP_CDMKEYSTATUS_OUTPUTDOWNSCALED: | 321 case PP_CDMKEYSTATUS_OUTPUTDOWNSCALED: |
322 return media::CdmKeyInformation::OUTPUT_DOWNSCALED; | 322 return media::CdmKeyInformation::OUTPUT_DOWNSCALED; |
323 case PP_CDMKEYSTATUS_STATUSPENDING: | 323 case PP_CDMKEYSTATUS_STATUSPENDING: |
324 return media::CdmKeyInformation::KEY_STATUS_PENDING; | 324 return media::CdmKeyInformation::KEY_STATUS_PENDING; |
| 325 case PP_CDMKEYSTATUS_RELEASED: |
| 326 return media::CdmKeyInformation::RELEASED; |
325 default: | 327 default: |
326 NOTREACHED(); | 328 NOTREACHED(); |
327 return media::CdmKeyInformation::INTERNAL_ERROR; | 329 return media::CdmKeyInformation::INTERNAL_ERROR; |
328 } | 330 } |
329 } | 331 } |
330 | 332 |
331 MediaKeys::MessageType PpCdmMessageTypeToMediaMessageType( | 333 MediaKeys::MessageType PpCdmMessageTypeToMediaMessageType( |
332 PP_CdmMessageType message_type) { | 334 PP_CdmMessageType message_type) { |
333 switch (message_type) { | 335 switch (message_type) { |
334 case PP_CDMMESSAGETYPE_LICENSE_REQUEST: | 336 case PP_CDMMESSAGETYPE_LICENSE_REQUEST: |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 empty_frames); | 1289 empty_frames); |
1288 } | 1290 } |
1289 | 1291 |
1290 if (!video_decode_cb_.is_null()) | 1292 if (!video_decode_cb_.is_null()) |
1291 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL); | 1293 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL); |
1292 | 1294 |
1293 cdm_promise_adapter_.Clear(); | 1295 cdm_promise_adapter_.Clear(); |
1294 } | 1296 } |
1295 | 1297 |
1296 } // namespace content | 1298 } // namespace content |
OLD | NEW |