Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "media/base/android/media_drm_bridge.h" | 5 #include "media/base/android/media_drm_bridge.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 733 DCHECK(!key_id.empty()); | 733 DCHECK(!key_id.empty()); |
| 734 | 734 |
| 735 jint j_status_code = Java_KeyStatus_getStatusCode(env, j_key_status); | 735 jint j_status_code = Java_KeyStatus_getStatusCode(env, j_key_status); |
| 736 CdmKeyInformation::KeyStatus key_status = | 736 CdmKeyInformation::KeyStatus key_status = |
| 737 ConvertKeyStatus(static_cast<KeyStatus>(j_status_code), is_key_release); | 737 ConvertKeyStatus(static_cast<KeyStatus>(j_status_code), is_key_release); |
| 738 | 738 |
| 739 DVLOG(2) << __func__ << "Key status change: " | 739 DVLOG(2) << __func__ << "Key status change: " |
| 740 << base::HexEncode(&key_id[0], key_id.size()) << ", " | 740 << base::HexEncode(&key_id[0], key_id.size()) << ", " |
| 741 << key_status; | 741 << key_status; |
| 742 | 742 |
| 743 cdm_keys_info.push_back(new CdmKeyInformation(key_id, key_status, 0)); | 743 cdm_keys_info.push_back( |
| 744 base::MakeUnique<CdmKeyInformation>(key_id, key_status, 0)); | |
|
xhwang
2017/05/17 16:39:45
Here and everywhere else, include base/memory/ptr_
xiaofengzhang
2017/05/18 05:43:26
Done.
| |
| 744 } | 745 } |
| 745 | 746 |
| 746 task_runner_->PostTask( | 747 task_runner_->PostTask( |
| 747 FROM_HERE, | 748 FROM_HERE, |
| 748 base::Bind(session_keys_change_cb_, JavaBytesToString(env, j_session_id), | 749 base::Bind(session_keys_change_cb_, JavaBytesToString(env, j_session_id), |
| 749 has_additional_usable_key, base::Passed(&cdm_keys_info))); | 750 has_additional_usable_key, base::Passed(&cdm_keys_info))); |
| 750 | 751 |
| 751 if (has_additional_usable_key) { | 752 if (has_additional_usable_key) { |
| 752 task_runner_->PostTask(FROM_HERE, | 753 task_runner_->PostTask(FROM_HERE, |
| 753 base::Bind(&MediaDrmBridge::OnHasAdditionalUsableKey, | 754 base::Bind(&MediaDrmBridge::OnHasAdditionalUsableKey, |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 939 } | 940 } |
| 940 | 941 |
| 941 void MediaDrmBridge::OnHasAdditionalUsableKey() { | 942 void MediaDrmBridge::OnHasAdditionalUsableKey() { |
| 942 DCHECK(task_runner_->BelongsToCurrentThread()); | 943 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 943 DVLOG(1) << __func__; | 944 DVLOG(1) << __func__; |
| 944 | 945 |
| 945 player_tracker_.NotifyNewKey(); | 946 player_tracker_.NotifyNewKey(); |
| 946 } | 947 } |
| 947 | 948 |
| 948 } // namespace media | 949 } // namespace media |
| OLD | NEW |