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

Side by Side Diff: media/blink/webcontentdecryptionmodulesession_impl.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 | « media/blink/cdm_session_adapter.cc ('k') | media/cdm/aes_decryptor.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 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 "webcontentdecryptionmodulesession_impl.h" 5 #include "webcontentdecryptionmodulesession_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 message.size()); 489 message.size());
490 } 490 }
491 491
492 void WebContentDecryptionModuleSessionImpl::OnSessionKeysChange( 492 void WebContentDecryptionModuleSessionImpl::OnSessionKeysChange(
493 bool has_additional_usable_key, 493 bool has_additional_usable_key,
494 CdmKeysInfo keys_info) { 494 CdmKeysInfo keys_info) {
495 DCHECK(thread_checker_.CalledOnValidThread()); 495 DCHECK(thread_checker_.CalledOnValidThread());
496 blink::WebVector<blink::WebEncryptedMediaKeyInformation> keys( 496 blink::WebVector<blink::WebEncryptedMediaKeyInformation> keys(
497 keys_info.size()); 497 keys_info.size());
498 for (size_t i = 0; i < keys_info.size(); ++i) { 498 for (size_t i = 0; i < keys_info.size(); ++i) {
499 auto* key_info = keys_info[i]; 499 auto& key_info = keys_info[i];
500 keys[i].SetId(blink::WebData(reinterpret_cast<char*>(&key_info->key_id[0]), 500 keys[i].SetId(blink::WebData(reinterpret_cast<char*>(&key_info->key_id[0]),
501 key_info->key_id.size())); 501 key_info->key_id.size()));
502 keys[i].SetStatus(convertStatus(key_info->status)); 502 keys[i].SetStatus(convertStatus(key_info->status));
503 keys[i].SetSystemCode(key_info->system_code); 503 keys[i].SetSystemCode(key_info->system_code);
504 } 504 }
505 505
506 // Now send the event to blink. 506 // Now send the event to blink.
507 client_->KeysStatusesChange(keys, has_additional_usable_key); 507 client_->KeysStatusesChange(keys, has_additional_usable_key);
508 } 508 }
509 509
(...skipping 30 matching lines...) Expand all
540 540
541 DCHECK(session_id_.empty()) << "Session ID may not be changed once set."; 541 DCHECK(session_id_.empty()) << "Session ID may not be changed once set.";
542 session_id_ = session_id; 542 session_id_ = session_id;
543 *status = 543 *status =
544 adapter_->RegisterSession(session_id_, weak_ptr_factory_.GetWeakPtr()) 544 adapter_->RegisterSession(session_id_, weak_ptr_factory_.GetWeakPtr())
545 ? SessionInitStatus::NEW_SESSION 545 ? SessionInitStatus::NEW_SESSION
546 : SessionInitStatus::SESSION_ALREADY_EXISTS; 546 : SessionInitStatus::SESSION_ALREADY_EXISTS;
547 } 547 }
548 548
549 } // namespace media 549 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/cdm_session_adapter.cc ('k') | media/cdm/aes_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698