| 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 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 } | 1294 } |
| 1295 | 1295 |
| 1296 // TODO(xhwang): Support multiple decryptor notification request (e.g. from | 1296 // TODO(xhwang): Support multiple decryptor notification request (e.g. from |
| 1297 // video and audio). The current implementation is okay for the current | 1297 // video and audio). The current implementation is okay for the current |
| 1298 // media pipeline since we initialize audio and video decoders in sequence. | 1298 // media pipeline since we initialize audio and video decoders in sequence. |
| 1299 // But WebMediaPlayerImpl should not depend on media pipeline's implementation | 1299 // But WebMediaPlayerImpl should not depend on media pipeline's implementation |
| 1300 // detail. | 1300 // detail. |
| 1301 DCHECK(decryptor_ready_cb_.is_null()); | 1301 DCHECK(decryptor_ready_cb_.is_null()); |
| 1302 | 1302 |
| 1303 // Mixed use of prefixed and unprefixed EME APIs is disallowed by Blink. | 1303 // Mixed use of prefixed and unprefixed EME APIs is disallowed by Blink. |
| 1304 DCHECK(!(proxy_decryptor_ && web_cdm_)); | 1304 DCHECK(!proxy_decryptor_ || !web_cdm_); |
| 1305 | 1305 |
| 1306 if (proxy_decryptor_) { | 1306 if (proxy_decryptor_) { |
| 1307 decryptor_ready_cb.Run(proxy_decryptor_->GetDecryptor()); | 1307 decryptor_ready_cb.Run(proxy_decryptor_->GetDecryptor()); |
| 1308 return; | 1308 return; |
| 1309 } | 1309 } |
| 1310 | 1310 |
| 1311 if (web_cdm_) { | 1311 if (web_cdm_) { |
| 1312 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); | 1312 decryptor_ready_cb.Run(web_cdm_->GetDecryptor()); |
| 1313 return; | 1313 return; |
| 1314 } | 1314 } |
| 1315 | 1315 |
| 1316 decryptor_ready_cb_ = decryptor_ready_cb; | 1316 decryptor_ready_cb_ = decryptor_ready_cb; |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 } // namespace content | 1319 } // namespace content |
| OLD | NEW |