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/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "base/metrics/sparse_histogram.h" | 9 #include "base/metrics/sparse_histogram.h" |
10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 PP_CdmKeyStatus status) { | 295 PP_CdmKeyStatus status) { |
296 switch (status) { | 296 switch (status) { |
297 case PP_CDMKEYSTATUS_USABLE: | 297 case PP_CDMKEYSTATUS_USABLE: |
298 return media::CdmKeyInformation::USABLE; | 298 return media::CdmKeyInformation::USABLE; |
299 case PP_CDMKEYSTATUS_INVALID: | 299 case PP_CDMKEYSTATUS_INVALID: |
300 return media::CdmKeyInformation::INTERNAL_ERROR; | 300 return media::CdmKeyInformation::INTERNAL_ERROR; |
301 case PP_CDMKEYSTATUS_EXPIRED: | 301 case PP_CDMKEYSTATUS_EXPIRED: |
302 return media::CdmKeyInformation::EXPIRED; | 302 return media::CdmKeyInformation::EXPIRED; |
303 case PP_CDMKEYSTATUS_OUTPUTNOTALLOWED: | 303 case PP_CDMKEYSTATUS_OUTPUTNOTALLOWED: |
304 return media::CdmKeyInformation::OUTPUT_NOT_ALLOWED; | 304 return media::CdmKeyInformation::OUTPUT_NOT_ALLOWED; |
| 305 case PP_CDMKEYSTATUS_OUTPUTDOWNSCALED: |
| 306 return media::CdmKeyInformation::OUTPUT_DOWNSCALED; |
| 307 case PP_CDMKEYSTATUS_STATUSPENDING: |
| 308 return media::CdmKeyInformation::KEY_STATUS_PENDING; |
305 default: | 309 default: |
306 NOTREACHED(); | 310 NOTREACHED(); |
307 return media::CdmKeyInformation::INTERNAL_ERROR; | 311 return media::CdmKeyInformation::INTERNAL_ERROR; |
308 } | 312 } |
309 } | 313 } |
310 | 314 |
311 MediaKeys::MessageType PpCdmMessageTypeToMediaMessageType( | 315 MediaKeys::MessageType PpCdmMessageTypeToMediaMessageType( |
312 PP_CdmMessageType message_type) { | 316 PP_CdmMessageType message_type) { |
313 switch (message_type) { | 317 switch (message_type) { |
314 case PP_CDMMESSAGETYPE_LICENSE_REQUEST: | 318 case PP_CDMMESSAGETYPE_LICENSE_REQUEST: |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 empty_frames); | 1272 empty_frames); |
1269 } | 1273 } |
1270 | 1274 |
1271 if (!video_decode_cb_.is_null()) | 1275 if (!video_decode_cb_.is_null()) |
1272 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL); | 1276 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL); |
1273 | 1277 |
1274 cdm_promise_adapter_.Clear(); | 1278 cdm_promise_adapter_.Clear(); |
1275 } | 1279 } |
1276 | 1280 |
1277 } // namespace content | 1281 } // namespace content |
OLD | NEW |