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

Side by Side Diff: content/renderer/media/crypto/encrypted_media_player_support_impl.cc

Issue 650853003: Buildfix for no-args cases to RenderCdmFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | content/renderer/render_frame_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 "content/renderer/media/crypto/encrypted_media_player_support_impl.h" 5 #include "content/renderer/media/crypto/encrypted_media_player_support_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if (current_key_system_.empty()) { 173 if (current_key_system_.empty()) {
174 if (!proxy_decryptor_) { 174 if (!proxy_decryptor_) {
175 proxy_decryptor_.reset(new ProxyDecryptor( 175 proxy_decryptor_.reset(new ProxyDecryptor(
176 BIND_TO_RENDER_LOOP(&EncryptedMediaPlayerSupportImpl::OnKeyAdded), 176 BIND_TO_RENDER_LOOP(&EncryptedMediaPlayerSupportImpl::OnKeyAdded),
177 BIND_TO_RENDER_LOOP(&EncryptedMediaPlayerSupportImpl::OnKeyError), 177 BIND_TO_RENDER_LOOP(&EncryptedMediaPlayerSupportImpl::OnKeyError),
178 BIND_TO_RENDER_LOOP(&EncryptedMediaPlayerSupportImpl::OnKeyMessage))); 178 BIND_TO_RENDER_LOOP(&EncryptedMediaPlayerSupportImpl::OnKeyMessage)));
179 } 179 }
180 180
181 GURL security_origin(frame->document().securityOrigin().toString()); 181 GURL security_origin(frame->document().securityOrigin().toString());
182 182
183 RenderCdmFactory cdm_factory( 183 RenderCdmFactory cdm_factory
184 #if defined(ENABLE_PEPPER_CDMS) 184 #if defined(ENABLE_PEPPER_CDMS)
185 base::Bind(&PepperCdmWrapperImpl::Create, frame) 185 (base::Bind(&PepperCdmWrapperImpl::Create, frame))
jamesr 2014/10/21 00:43:38 at this point sharing the variable declaration isn
gunsch 2014/10/21 00:50:28 Done.
186 #endif 186 #endif
187 ); 187 ;
188 188
189 if (!proxy_decryptor_->InitializeCDM(&cdm_factory, key_system, 189 if (!proxy_decryptor_->InitializeCDM(&cdm_factory, key_system,
190 security_origin)) { 190 security_origin)) {
191 return WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported; 191 return WebMediaPlayer::MediaKeyExceptionKeySystemNotSupported;
192 } 192 }
193 193
194 if (proxy_decryptor_ && !decryptor_ready_cb_.is_null()) { 194 if (proxy_decryptor_ && !decryptor_ready_cb_.is_null()) {
195 base::ResetAndReturn(&decryptor_ready_cb_) 195 base::ResetAndReturn(&decryptor_ready_cb_)
196 .Run(proxy_decryptor_->GetDecryptor(), base::Bind(DoNothing)); 196 .Run(proxy_decryptor_->GetDecryptor(), base::Bind(DoNothing));
197 } 197 }
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 465
466 if (web_cdm_) { 466 if (web_cdm_) {
467 decryptor_ready_cb.Run(web_cdm_->GetDecryptor(), base::Bind(DoNothing)); 467 decryptor_ready_cb.Run(web_cdm_->GetDecryptor(), base::Bind(DoNothing));
468 return; 468 return;
469 } 469 }
470 470
471 decryptor_ready_cb_ = decryptor_ready_cb; 471 decryptor_ready_cb_ = decryptor_ready_cb;
472 } 472 }
473 473
474 } // namespace content 474 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698