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

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

Issue 2895573002: Reland of Remove ScopedVector from all other codes in media/ (Closed)
Patch Set: Fix the compile fails in build target "jpeg_decode_accelerator_unittest" 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"
13 #include "base/metrics/histogram_macros.h" 14 #include "base/metrics/histogram_macros.h"
14 #include "base/numerics/safe_conversions.h" 15 #include "base/numerics/safe_conversions.h"
15 #include "base/trace_event/trace_event.h" 16 #include "base/trace_event/trace_event.h"
16 #include "content/renderer/pepper/ppb_buffer_impl.h" 17 #include "content/renderer/pepper/ppb_buffer_impl.h"
17 #include "media/base/audio_decoder_config.h" 18 #include "media/base/audio_decoder_config.h"
18 #include "media/base/bind_to_current_loop.h" 19 #include "media/base/bind_to_current_loop.h"
19 #include "media/base/cdm_key_information.h" 20 #include "media/base/cdm_key_information.h"
20 #include "media/base/channel_layout.h" 21 #include "media/base/channel_layout.h"
21 #include "media/base/data_buffer.h" 22 #include "media/base/data_buffer.h"
22 #include "media/base/decoder_buffer.h" 23 #include "media/base/decoder_buffer.h"
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 if (session_keys_change_cb_.is_null()) 803 if (session_keys_change_cb_.is_null())
803 return; 804 return;
804 805
805 StringVar* session_id_string = StringVar::FromPPVar(session_id); 806 StringVar* session_id_string = StringVar::FromPPVar(session_id);
806 DCHECK(session_id_string); 807 DCHECK(session_id_string);
807 808
808 media::CdmKeysInfo keys_info; 809 media::CdmKeysInfo keys_info;
809 keys_info.reserve(key_count); 810 keys_info.reserve(key_count);
810 for (uint32_t i = 0; i < key_count; ++i) { 811 for (uint32_t i = 0; i < key_count; ++i) {
811 const auto& info = key_information[i]; 812 const auto& info = key_information[i];
812 keys_info.push_back(new media::CdmKeyInformation( 813 keys_info.push_back(base::MakeUnique<media::CdmKeyInformation>(
813 info.key_id, info.key_id_size, 814 info.key_id, info.key_id_size,
814 PpCdmKeyStatusToCdmKeyInformationKeyStatus(info.key_status), 815 PpCdmKeyStatusToCdmKeyInformationKeyStatus(info.key_status),
815 info.system_code)); 816 info.system_code));
816 } 817 }
817 818
818 session_keys_change_cb_.Run(session_id_string->value(), 819 session_keys_change_cb_.Run(session_id_string->value(),
819 PP_ToBool(has_additional_usable_key), 820 PP_ToBool(has_additional_usable_key),
820 std::move(keys_info)); 821 std::move(keys_info));
821 } 822 }
822 823
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 1276
1276 if (!video_decode_cb_.is_null()) 1277 if (!video_decode_cb_.is_null())
1277 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL); 1278 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL);
1278 1279
1279 cdm_promise_adapter_.Clear(); 1280 cdm_promise_adapter_.Clear();
1280 1281
1281 cdm_session_tracker_.CloseRemainingSessions(session_closed_cb_); 1282 cdm_session_tracker_.CloseRemainingSessions(session_closed_cb_);
1282 } 1283 }
1283 1284
1284 } // namespace content 1285 } // 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