Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: content/renderer/pepper/content_decryptor_delegate.cc

Issue 2893953002: Revert of Remove ScopedVector from all other codes in media/ (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromecast/media/cdm/cast_cdm.cc ('k') | media/base/android/media_drm_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string.h> 7 #include <string.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback_helpers.h" 11 #include "base/callback_helpers.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ptr_util.h"
14 #include "base/metrics/histogram_macros.h" 13 #include "base/metrics/histogram_macros.h"
15 #include "base/numerics/safe_conversions.h" 14 #include "base/numerics/safe_conversions.h"
16 #include "base/trace_event/trace_event.h" 15 #include "base/trace_event/trace_event.h"
17 #include "content/renderer/pepper/ppb_buffer_impl.h" 16 #include "content/renderer/pepper/ppb_buffer_impl.h"
18 #include "media/base/audio_decoder_config.h" 17 #include "media/base/audio_decoder_config.h"
19 #include "media/base/bind_to_current_loop.h" 18 #include "media/base/bind_to_current_loop.h"
20 #include "media/base/cdm_key_information.h" 19 #include "media/base/cdm_key_information.h"
21 #include "media/base/channel_layout.h" 20 #include "media/base/channel_layout.h"
22 #include "media/base/data_buffer.h" 21 #include "media/base/data_buffer.h"
23 #include "media/base/decoder_buffer.h" 22 #include "media/base/decoder_buffer.h"
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 if (session_keys_change_cb_.is_null()) 802 if (session_keys_change_cb_.is_null())
804 return; 803 return;
805 804
806 StringVar* session_id_string = StringVar::FromPPVar(session_id); 805 StringVar* session_id_string = StringVar::FromPPVar(session_id);
807 DCHECK(session_id_string); 806 DCHECK(session_id_string);
808 807
809 media::CdmKeysInfo keys_info; 808 media::CdmKeysInfo keys_info;
810 keys_info.reserve(key_count); 809 keys_info.reserve(key_count);
811 for (uint32_t i = 0; i < key_count; ++i) { 810 for (uint32_t i = 0; i < key_count; ++i) {
812 const auto& info = key_information[i]; 811 const auto& info = key_information[i];
813 keys_info.push_back(base::MakeUnique<media::CdmKeyInformation>( 812 keys_info.push_back(new media::CdmKeyInformation(
814 info.key_id, info.key_id_size, 813 info.key_id, info.key_id_size,
815 PpCdmKeyStatusToCdmKeyInformationKeyStatus(info.key_status), 814 PpCdmKeyStatusToCdmKeyInformationKeyStatus(info.key_status),
816 info.system_code)); 815 info.system_code));
817 } 816 }
818 817
819 session_keys_change_cb_.Run(session_id_string->value(), 818 session_keys_change_cb_.Run(session_id_string->value(),
820 PP_ToBool(has_additional_usable_key), 819 PP_ToBool(has_additional_usable_key),
821 std::move(keys_info)); 820 std::move(keys_info));
822 } 821 }
823 822
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 1275
1277 if (!video_decode_cb_.is_null()) 1276 if (!video_decode_cb_.is_null())
1278 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL); 1277 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL);
1279 1278
1280 cdm_promise_adapter_.Clear(); 1279 cdm_promise_adapter_.Clear();
1281 1280
1282 cdm_session_tracker_.CloseRemainingSessions(session_closed_cb_); 1281 cdm_session_tracker_.CloseRemainingSessions(session_closed_cb_);
1283 } 1282 }
1284 1283
1285 } // namespace content 1284 } // namespace content
OLDNEW
« no previous file with comments | « chromecast/media/cdm/cast_cdm.cc ('k') | media/base/android/media_drm_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698