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