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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 case PP_DECRYPTRESULT_SUCCESS: | 206 case PP_DECRYPTRESULT_SUCCESS: |
207 return Decryptor::kSuccess; | 207 return Decryptor::kSuccess; |
208 case PP_DECRYPTRESULT_DECRYPT_NOKEY: | 208 case PP_DECRYPTRESULT_DECRYPT_NOKEY: |
209 return Decryptor::kNoKey; | 209 return Decryptor::kNoKey; |
210 case PP_DECRYPTRESULT_NEEDMOREDATA: | 210 case PP_DECRYPTRESULT_NEEDMOREDATA: |
211 return Decryptor::kNeedMoreData; | 211 return Decryptor::kNeedMoreData; |
212 case PP_DECRYPTRESULT_DECRYPT_ERROR: | 212 case PP_DECRYPTRESULT_DECRYPT_ERROR: |
213 return Decryptor::kError; | 213 return Decryptor::kError; |
214 case PP_DECRYPTRESULT_DECODE_ERROR: | 214 case PP_DECRYPTRESULT_DECODE_ERROR: |
215 return Decryptor::kError; | 215 return Decryptor::kError; |
| 216 case PP_DECRYPTRESULT_SESSION_ERROR: |
| 217 return Decryptor::kError; |
| 218 case PP_DECRYPTRESULT_DEFERRED_INITIALIZATION: |
| 219 return Decryptor::kError; |
216 default: | 220 default: |
217 NOTREACHED(); | 221 NOTREACHED(); |
218 return Decryptor::kError; | 222 return Decryptor::kError; |
219 } | 223 } |
220 } | 224 } |
221 | 225 |
222 PP_DecryptorStreamType MediaDecryptorStreamTypeToPpStreamType( | 226 PP_DecryptorStreamType MediaDecryptorStreamTypeToPpStreamType( |
223 Decryptor::StreamType stream_type) { | 227 Decryptor::StreamType stream_type) { |
224 switch (stream_type) { | 228 switch (stream_type) { |
225 case Decryptor::kAudio: | 229 case Decryptor::kAudio: |
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 empty_frames); | 1292 empty_frames); |
1289 } | 1293 } |
1290 | 1294 |
1291 if (!video_decode_cb_.is_null()) | 1295 if (!video_decode_cb_.is_null()) |
1292 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL); | 1296 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL); |
1293 | 1297 |
1294 cdm_promise_adapter_.Clear(); | 1298 cdm_promise_adapter_.Clear(); |
1295 } | 1299 } |
1296 | 1300 |
1297 } // namespace content | 1301 } // namespace content |
OLD | NEW |