| 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 "content/renderer/media/webmediaplayer_impl.h" | 5 #include "content/renderer/media/webmediaplayer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 // TODO(xhwang): Support multiple decryptor notification request (e.g. from | 1308 // TODO(xhwang): Support multiple decryptor notification request (e.g. from |
| 1309 // video and audio). The current implementation is okay for the current | 1309 // video and audio). The current implementation is okay for the current |
| 1310 // media pipeline since we initialize audio and video decoders in sequence. | 1310 // media pipeline since we initialize audio and video decoders in sequence. |
| 1311 // But WebMediaPlayerImpl should not depend on media pipeline's implementation | 1311 // But WebMediaPlayerImpl should not depend on media pipeline's implementation |
| 1312 // detail. | 1312 // detail. |
| 1313 DCHECK(decryptor_ready_cb_.is_null()); | 1313 DCHECK(decryptor_ready_cb_.is_null()); |
| 1314 | 1314 |
| 1315 // Mixed use of prefixed and unprefixed EME APIs is disallowed by Blink. | 1315 // Mixed use of prefixed and unprefixed EME APIs is disallowed by Blink. |
| 1316 DCHECK(!(proxy_decryptor_ && web_cdm_)); | 1316 DCHECK(!proxy_decryptor_ || !web_cdm_); |
| 1317 | 1317 |
| 1318 if (proxy_decryptor_) { | 1318 if (proxy_decryptor_) { |
| 1319 decryptor_ready_cb.Run(proxy_decryptor_->GetDecryptor()); | 1319 decryptor_ready_cb.Run(proxy_decryptor_->GetDecryptor()); |
| 1320 return; | 1320 return; |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 if (web_cdm_) { | 1323 if (web_cdm_) { |
| 1324 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1324 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
| 1325 return; | 1325 return; |
| 1326 } | 1326 } |
| 1327 | 1327 |
| 1328 decryptor_ready_cb_ = decryptor_ready_cb; | 1328 decryptor_ready_cb_ = decryptor_ready_cb; |
| 1329 } | 1329 } |
| 1330 | 1330 |
| 1331 } // namespace content | 1331 } // namespace content |
| OLD | NEW |