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

Side by Side Diff: media/mojo/services/mojo_cdm.cc

Issue 1635603002: Make use of CreateInterfacePtrAndBind() where appropriate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 10 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/mojo/services/media_apptest.cc ('k') | media/mojo/services/mojo_renderer_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/mojo/services/mojo_cdm.h" 5 #include "media/mojo/services/mojo_cdm.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 session_keys_change_cb_(session_keys_change_cb), 69 session_keys_change_cb_(session_keys_change_cb),
70 session_expiration_update_cb_(session_expiration_update_cb), 70 session_expiration_update_cb_(session_expiration_update_cb),
71 weak_factory_(this) { 71 weak_factory_(this) {
72 DVLOG(1) << __FUNCTION__; 72 DVLOG(1) << __FUNCTION__;
73 DCHECK(!session_message_cb_.is_null()); 73 DCHECK(!session_message_cb_.is_null());
74 DCHECK(!session_closed_cb_.is_null()); 74 DCHECK(!session_closed_cb_.is_null());
75 DCHECK(!legacy_session_error_cb_.is_null()); 75 DCHECK(!legacy_session_error_cb_.is_null());
76 DCHECK(!session_keys_change_cb_.is_null()); 76 DCHECK(!session_keys_change_cb_.is_null());
77 DCHECK(!session_expiration_update_cb_.is_null()); 77 DCHECK(!session_expiration_update_cb_.is_null());
78 78
79 interfaces::ContentDecryptionModuleClientPtr client_ptr; 79 remote_cdm_->SetClient(binding_.CreateInterfacePtrAndBind());
80 binding_.Bind(GetProxy(&client_ptr));
81 remote_cdm_->SetClient(std::move(client_ptr));
82 } 80 }
83 81
84 MojoCdm::~MojoCdm() { 82 MojoCdm::~MojoCdm() {
85 DVLOG(1) << __FUNCTION__; 83 DVLOG(1) << __FUNCTION__;
86 } 84 }
87 85
88 void MojoCdm::InitializeCdm(const std::string& key_system, 86 void MojoCdm::InitializeCdm(const std::string& key_system,
89 const GURL& security_origin, 87 const GURL& security_origin,
90 const media::CdmConfig& cdm_config, 88 const media::CdmConfig& cdm_config,
91 scoped_ptr<CdmInitializedPromise> promise) { 89 scoped_ptr<CdmInitializedPromise> promise) {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 return; 247 return;
250 } 248 }
251 249
252 DCHECK_NE(CdmContext::kInvalidCdmId, cdm_id); 250 DCHECK_NE(CdmContext::kInvalidCdmId, cdm_id);
253 cdm_id_ = cdm_id; 251 cdm_id_ = cdm_id;
254 decryptor_ptr_ = std::move(decryptor); 252 decryptor_ptr_ = std::move(decryptor);
255 promise->resolve(); 253 promise->resolve();
256 } 254 }
257 255
258 } // namespace media 256 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/media_apptest.cc ('k') | media/mojo/services/mojo_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698