diff options
48 files changed, 298 insertions, 318 deletions
diff --git a/chromecast/browser/media/cast_browser_cdm_factory.cc b/chromecast/browser/media/cast_browser_cdm_factory.cc index ef41155..ee2107a 100644 --- a/chromecast/browser/media/cast_browser_cdm_factory.cc +++ b/chromecast/browser/media/cast_browser_cdm_factory.cc @@ -18,7 +18,7 @@ scoped_ptr<::media::BrowserCdm> CastBrowserCdmFactory::CreateBrowserCdm( bool use_secure_surface, const ::media::SessionMessageCB& session_message_cb, const ::media::SessionClosedCB& session_closed_cb, - const ::media::SessionErrorCB& session_error_cb, + const ::media::LegacySessionErrorCB& legacy_session_error_cb, const ::media::SessionKeysChangeCB& session_keys_change_cb, const ::media::SessionExpirationUpdateCB& session_expiration_update_cb) { DCHECK(!use_secure_surface) << "Chromecast does not use |use_secure_surface|"; @@ -36,12 +36,9 @@ scoped_ptr<::media::BrowserCdm> CastBrowserCdmFactory::CreateBrowserCdm( CmaMessageLoop::GetMessageLoopProxy()->PostTask( FROM_HERE, base::Bind(&BrowserCdmCast::Initialize, - base::Unretained(browser_cdm.get()), - session_message_cb, - session_closed_cb, - session_error_cb, - session_keys_change_cb, - session_expiration_update_cb)); + base::Unretained(browser_cdm.get()), session_message_cb, + session_closed_cb, legacy_session_error_cb, + session_keys_change_cb, session_expiration_update_cb)); return make_scoped_ptr( new BrowserCdmCastUi(browser_cdm.Pass(), CmaMessageLoop::GetMessageLoopProxy())); diff --git a/chromecast/browser/media/cast_browser_cdm_factory.h b/chromecast/browser/media/cast_browser_cdm_factory.h index dc72919..04a0537 100644 --- a/chromecast/browser/media/cast_browser_cdm_factory.h +++ b/chromecast/browser/media/cast_browser_cdm_factory.h @@ -25,7 +25,7 @@ class CastBrowserCdmFactory : public ::media::BrowserCdmFactory { bool use_secure_surface, const ::media::SessionMessageCB& session_message_cb, const ::media::SessionClosedCB& session_closed_cb, - const ::media::SessionErrorCB& session_error_cb, + const ::media::LegacySessionErrorCB& legacy_session_error_cb, const ::media::SessionKeysChangeCB& session_keys_change_cb, const ::media::SessionExpirationUpdateCB& session_expiration_update_cb) override; diff --git a/chromecast/media/cdm/browser_cdm_cast.cc b/chromecast/media/cdm/browser_cdm_cast.cc index 7ab5614..33c10c5 100644 --- a/chromecast/media/cdm/browser_cdm_cast.cc +++ b/chromecast/media/cdm/browser_cdm_cast.cc @@ -27,7 +27,7 @@ BrowserCdmCast::~BrowserCdmCast() { void BrowserCdmCast::Initialize( const ::media::SessionMessageCB& session_message_cb, const ::media::SessionClosedCB& session_closed_cb, - const ::media::SessionErrorCB& session_error_cb, + const ::media::LegacySessionErrorCB& legacy_session_error_cb, const ::media::SessionKeysChangeCB& session_keys_change_cb, const ::media::SessionExpirationUpdateCB& session_expiration_update_cb) { DCHECK(thread_checker_.CalledOnValidThread()); @@ -36,7 +36,7 @@ void BrowserCdmCast::Initialize( session_message_cb_ = session_message_cb; session_closed_cb_ = session_closed_cb; - session_error_cb_ = session_error_cb; + legacy_session_error_cb_ = legacy_session_error_cb; session_keys_change_cb_ = session_keys_change_cb; session_expiration_update_cb_ = session_expiration_update_cb; } @@ -57,10 +57,9 @@ void BrowserCdmCast::LoadSession( const std::string& session_id, scoped_ptr<::media::NewSessionCdmPromise> promise) { NOTREACHED() << "LoadSession not supported"; - session_error_cb_.Run(session_id, - ::media::MediaKeys::Exception::NOT_SUPPORTED_ERROR, - 0, - std::string()); + legacy_session_error_cb_.Run( + session_id, ::media::MediaKeys::Exception::NOT_SUPPORTED_ERROR, 0, + std::string()); } ::media::CdmContext* BrowserCdmCast::GetCdmContext() { diff --git a/chromecast/media/cdm/browser_cdm_cast.h b/chromecast/media/cdm/browser_cdm_cast.h index 1291012..28fb984 100644 --- a/chromecast/media/cdm/browser_cdm_cast.h +++ b/chromecast/media/cdm/browser_cdm_cast.h @@ -44,7 +44,7 @@ class BrowserCdmCast : public ::media::BrowserCdm { void Initialize( const ::media::SessionMessageCB& session_message_cb, const ::media::SessionClosedCB& session_closed_cb, - const ::media::SessionErrorCB& session_error_cb, + const ::media::LegacySessionErrorCB& legacy_session_error_cb, const ::media::SessionKeysChangeCB& session_keys_change_cb, const ::media::SessionExpirationUpdateCB& session_expiration_update_cb); @@ -91,7 +91,7 @@ class BrowserCdmCast : public ::media::BrowserCdm { ::media::SessionMessageCB session_message_cb_; ::media::SessionClosedCB session_closed_cb_; - ::media::SessionErrorCB session_error_cb_; + ::media::LegacySessionErrorCB legacy_session_error_cb_; ::media::SessionKeysChangeCB session_keys_change_cb_; ::media::SessionExpirationUpdateCB session_expiration_update_cb_; diff --git a/content/renderer/media/crypto/ppapi_decryptor.cc b/content/renderer/media/crypto/ppapi_decryptor.cc index c243dbc..a70249a 100644 --- a/content/renderer/media/crypto/ppapi_decryptor.cc +++ b/content/renderer/media/crypto/ppapi_decryptor.cc @@ -30,7 +30,7 @@ scoped_ptr<PpapiDecryptor> PpapiDecryptor::Create( const CreatePepperCdmCB& create_pepper_cdm_cb, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb) { std::string plugin_type = media::GetPepperType(key_system); @@ -42,16 +42,11 @@ scoped_ptr<PpapiDecryptor> PpapiDecryptor::Create( return scoped_ptr<PpapiDecryptor>(); } - return scoped_ptr<PpapiDecryptor>( - new PpapiDecryptor(key_system, - allow_distinctive_identifier, - allow_persistent_state, - pepper_cdm_wrapper.Pass(), - session_message_cb, - session_closed_cb, - session_error_cb, - session_keys_change_cb, - session_expiration_update_cb)); + return scoped_ptr<PpapiDecryptor>(new PpapiDecryptor( + key_system, allow_distinctive_identifier, allow_persistent_state, + pepper_cdm_wrapper.Pass(), session_message_cb, session_closed_cb, + legacy_session_error_cb, session_keys_change_cb, + session_expiration_update_cb)); } PpapiDecryptor::PpapiDecryptor( @@ -61,13 +56,13 @@ PpapiDecryptor::PpapiDecryptor( scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb) : pepper_cdm_wrapper_(pepper_cdm_wrapper.Pass()), session_message_cb_(session_message_cb), session_closed_cb_(session_closed_cb), - session_error_cb_(session_error_cb), + legacy_session_error_cb_(legacy_session_error_cb), session_keys_change_cb_(session_keys_change_cb), session_expiration_update_cb_(session_expiration_update_cb), render_loop_proxy_(base::MessageLoopProxy::current()), @@ -75,18 +70,16 @@ PpapiDecryptor::PpapiDecryptor( DCHECK(pepper_cdm_wrapper_.get()); DCHECK(!session_message_cb_.is_null()); DCHECK(!session_closed_cb_.is_null()); - DCHECK(!session_error_cb_.is_null()); + DCHECK(!legacy_session_error_cb_.is_null()); DCHECK(!session_keys_change_cb.is_null()); DCHECK(!session_expiration_update_cb.is_null()); base::WeakPtr<PpapiDecryptor> weak_this = weak_ptr_factory_.GetWeakPtr(); CdmDelegate()->Initialize( - key_system, - allow_distinctive_identifier, - allow_persistent_state, + key_system, allow_distinctive_identifier, allow_persistent_state, base::Bind(&PpapiDecryptor::OnSessionMessage, weak_this), base::Bind(&PpapiDecryptor::OnSessionClosed, weak_this), - base::Bind(&PpapiDecryptor::OnSessionError, weak_this), + base::Bind(&PpapiDecryptor::OnLegacySessionError, weak_this), base::Bind(&PpapiDecryptor::OnSessionKeysChange, weak_this), base::Bind(&PpapiDecryptor::OnSessionExpirationUpdate, weak_this), base::Bind(&PpapiDecryptor::OnFatalPluginError, weak_this)); @@ -433,13 +426,14 @@ void PpapiDecryptor::OnSessionClosed(const std::string& session_id) { session_closed_cb_.Run(session_id); } -void PpapiDecryptor::OnSessionError(const std::string& session_id, - MediaKeys::Exception exception_code, - uint32 system_code, - const std::string& error_description) { +void PpapiDecryptor::OnLegacySessionError( + const std::string& session_id, + MediaKeys::Exception exception_code, + uint32 system_code, + const std::string& error_description) { DCHECK(render_loop_proxy_->BelongsToCurrentThread()); - session_error_cb_.Run(session_id, exception_code, system_code, - error_description); + legacy_session_error_cb_.Run(session_id, exception_code, system_code, + error_description); } void PpapiDecryptor::AttemptToResumePlayback() { diff --git a/content/renderer/media/crypto/ppapi_decryptor.h b/content/renderer/media/crypto/ppapi_decryptor.h index 35a28cb4..ed4523f 100644 --- a/content/renderer/media/crypto/ppapi_decryptor.h +++ b/content/renderer/media/crypto/ppapi_decryptor.h @@ -42,7 +42,7 @@ class PpapiDecryptor : public media::MediaKeys, const CreatePepperCdmCB& create_pepper_cdm_cb, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb); @@ -104,7 +104,7 @@ class PpapiDecryptor : public media::MediaKeys, scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb); @@ -121,10 +121,10 @@ class PpapiDecryptor : public media::MediaKeys, void OnSessionExpirationUpdate(const std::string& session_id, const base::Time& new_expiry_time); void OnSessionClosed(const std::string& session_id); - void OnSessionError(const std::string& session_id, - MediaKeys::Exception exception_code, - uint32 system_code, - const std::string& error_description); + void OnLegacySessionError(const std::string& session_id, + MediaKeys::Exception exception_code, + uint32 system_code, + const std::string& error_description); void AttemptToResumePlayback(); @@ -142,7 +142,7 @@ class PpapiDecryptor : public media::MediaKeys, // Callbacks for firing session events. media::SessionMessageCB session_message_cb_; media::SessionClosedCB session_closed_cb_; - media::SessionErrorCB session_error_cb_; + media::LegacySessionErrorCB legacy_session_error_cb_; media::SessionKeysChangeCB session_keys_change_cb_; media::SessionExpirationUpdateCB session_expiration_update_cb_; diff --git a/content/renderer/media/crypto/proxy_media_keys.cc b/content/renderer/media/crypto/proxy_media_keys.cc index f7478f9..9dd2de67 100644 --- a/content/renderer/media/crypto/proxy_media_keys.cc +++ b/content/renderer/media/crypto/proxy_media_keys.cc @@ -22,12 +22,12 @@ scoped_ptr<ProxyMediaKeys> ProxyMediaKeys::Create( RendererCdmManager* manager, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb) { DCHECK(manager); scoped_ptr<ProxyMediaKeys> proxy_media_keys(new ProxyMediaKeys( - manager, session_message_cb, session_closed_cb, session_error_cb, + manager, session_message_cb, session_closed_cb, legacy_session_error_cb, session_keys_change_cb, session_expiration_update_cb)); proxy_media_keys->InitializeCdm(key_system, security_origin); return proxy_media_keys.Pass(); @@ -151,7 +151,8 @@ void ProxyMediaKeys::OnLegacySessionError(const std::string& session_id, media::MediaKeys::Exception exception, uint32 system_code, const std::string& error_message) { - session_error_cb_.Run(session_id, exception, system_code, error_message); + legacy_session_error_cb_.Run(session_id, exception, system_code, + error_message); } void ProxyMediaKeys::OnSessionKeysChange(const std::string& session_id, @@ -189,13 +190,13 @@ ProxyMediaKeys::ProxyMediaKeys( RendererCdmManager* manager, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb) : manager_(manager), session_message_cb_(session_message_cb), session_closed_cb_(session_closed_cb), - session_error_cb_(session_error_cb), + legacy_session_error_cb_(legacy_session_error_cb), session_keys_change_cb_(session_keys_change_cb), session_expiration_update_cb_(session_expiration_update_cb) { cdm_id_ = manager->RegisterMediaKeys(this); diff --git a/content/renderer/media/crypto/proxy_media_keys.h b/content/renderer/media/crypto/proxy_media_keys.h index 497aad4..e13fc3d 100644 --- a/content/renderer/media/crypto/proxy_media_keys.h +++ b/content/renderer/media/crypto/proxy_media_keys.h @@ -31,7 +31,7 @@ class ProxyMediaKeys : public media::MediaKeys, public media::CdmContext { RendererCdmManager* manager, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb); @@ -94,7 +94,7 @@ class ProxyMediaKeys : public media::MediaKeys, public media::CdmContext { RendererCdmManager* manager, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb); @@ -106,7 +106,7 @@ class ProxyMediaKeys : public media::MediaKeys, public media::CdmContext { media::SessionMessageCB session_message_cb_; media::SessionClosedCB session_closed_cb_; - media::SessionErrorCB session_error_cb_; + media::LegacySessionErrorCB legacy_session_error_cb_; media::SessionKeysChangeCB session_keys_change_cb_; media::SessionExpirationUpdateCB session_expiration_update_cb_; diff --git a/content/renderer/media/crypto/render_cdm_factory.cc b/content/renderer/media/crypto/render_cdm_factory.cc index 9e1f92d..01d9a27 100644 --- a/content/renderer/media/crypto/render_cdm_factory.cc +++ b/content/renderer/media/crypto/render_cdm_factory.cc @@ -41,7 +41,7 @@ scoped_ptr<media::MediaKeys> RenderCdmFactory::Create( const GURL& security_origin, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb) { // TODO(jrummell): Pass |security_origin| to all constructors. @@ -59,29 +59,18 @@ scoped_ptr<media::MediaKeys> RenderCdmFactory::Create( } #if defined(ENABLE_PEPPER_CDMS) - return scoped_ptr<media::MediaKeys>( - PpapiDecryptor::Create(key_system, - allow_distinctive_identifier, - allow_persistent_state, - security_origin, - create_pepper_cdm_cb_, - session_message_cb, - session_closed_cb, - session_error_cb, - session_keys_change_cb, - session_expiration_update_cb)); + return scoped_ptr<media::MediaKeys>(PpapiDecryptor::Create( + key_system, allow_distinctive_identifier, allow_persistent_state, + security_origin, create_pepper_cdm_cb_, session_message_cb, + session_closed_cb, legacy_session_error_cb, session_keys_change_cb, + session_expiration_update_cb)); #elif defined(ENABLE_BROWSER_CDMS) DCHECK(allow_distinctive_identifier); DCHECK(allow_persistent_state); - return scoped_ptr<media::MediaKeys>( - ProxyMediaKeys::Create(key_system, - security_origin, - manager_, - session_message_cb, - session_closed_cb, - session_error_cb, - session_keys_change_cb, - session_expiration_update_cb)); + return scoped_ptr<media::MediaKeys>(ProxyMediaKeys::Create( + key_system, security_origin, manager_, session_message_cb, + session_closed_cb, legacy_session_error_cb, session_keys_change_cb, + session_expiration_update_cb)); #else return nullptr; #endif // defined(ENABLE_PEPPER_CDMS) diff --git a/content/renderer/media/crypto/render_cdm_factory.h b/content/renderer/media/crypto/render_cdm_factory.h index a743120..50e1422 100644 --- a/content/renderer/media/crypto/render_cdm_factory.h +++ b/content/renderer/media/crypto/render_cdm_factory.h @@ -42,7 +42,7 @@ class RenderCdmFactory : public media::CdmFactory { const GURL& security_origin, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb) override; diff --git a/content/renderer/pepper/content_decryptor_delegate.cc b/content/renderer/pepper/content_decryptor_delegate.cc index 238d7a3..e8dc612 100644 --- a/content/renderer/pepper/content_decryptor_delegate.cc +++ b/content/renderer/pepper/content_decryptor_delegate.cc @@ -378,7 +378,7 @@ void ContentDecryptorDelegate::Initialize( bool allow_persistent_state, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb, const base::Closure& fatal_plugin_error_cb) { @@ -388,7 +388,7 @@ void ContentDecryptorDelegate::Initialize( session_message_cb_ = session_message_cb; session_closed_cb_ = session_closed_cb; - session_error_cb_ = session_error_cb; + legacy_session_error_cb_ = legacy_session_error_cb; session_keys_change_cb_ = session_keys_change_cb; session_expiration_update_cb_ = session_expiration_update_cb; fatal_plugin_error_cb_ = fatal_plugin_error_cb; @@ -846,14 +846,14 @@ void ContentDecryptorDelegate::OnSessionClosed(PP_Var session_id) { session_closed_cb_.Run(session_id_string->value()); } -void ContentDecryptorDelegate::OnSessionError( +void ContentDecryptorDelegate::OnLegacySessionError( PP_Var session_id, PP_CdmExceptionCode exception_code, uint32 system_code, PP_Var error_description) { ReportSystemCodeUMA(key_system_, system_code); - if (session_error_cb_.is_null()) + if (legacy_session_error_cb_.is_null()) return; StringVar* session_id_string = StringVar::FromPPVar(session_id); @@ -862,9 +862,9 @@ void ContentDecryptorDelegate::OnSessionError( StringVar* error_description_string = StringVar::FromPPVar(error_description); DCHECK(error_description_string); - session_error_cb_.Run(session_id_string->value(), - PpExceptionTypeToMediaException(exception_code), - system_code, error_description_string->value()); + legacy_session_error_cb_.Run(session_id_string->value(), + PpExceptionTypeToMediaException(exception_code), + system_code, error_description_string->value()); } void ContentDecryptorDelegate::DecoderInitializeDone( diff --git a/content/renderer/pepper/content_decryptor_delegate.h b/content/renderer/pepper/content_decryptor_delegate.h index 5c08b77..1fbeddb 100644 --- a/content/renderer/pepper/content_decryptor_delegate.h +++ b/content/renderer/pepper/content_decryptor_delegate.h @@ -52,7 +52,7 @@ class ContentDecryptorDelegate { bool allow_persistent_state, const media::SessionMessageCB& session_message_cb, const media::SessionClosedCB& session_closed_cb, - const media::SessionErrorCB& session_error_cb, + const media::LegacySessionErrorCB& legacy_session_error_cb, const media::SessionKeysChangeCB& session_keys_change_cb, const media::SessionExpirationUpdateCB& session_expiration_update_cb, const base::Closure& fatal_plugin_error_cb); @@ -119,10 +119,10 @@ class ContentDecryptorDelegate { const struct PP_KeyInformation key_information[]); void OnSessionExpirationChange(PP_Var session_id, PP_Time new_expiry_time); void OnSessionClosed(PP_Var session_id); - void OnSessionError(PP_Var session_id, - PP_CdmExceptionCode exception_code, - uint32 system_code, - PP_Var error_description); + void OnLegacySessionError(PP_Var session_id, + PP_CdmExceptionCode exception_code, + uint32 system_code, + PP_Var error_description); void DeliverBlock(PP_Resource decrypted_block, const PP_DecryptedBlockInfo* block_info); void DecoderInitializeDone(PP_DecryptorStreamType decoder_type, @@ -209,7 +209,7 @@ class ContentDecryptorDelegate { // Callbacks for firing session events. media::SessionMessageCB session_message_cb_; media::SessionClosedCB session_closed_cb_; - media::SessionErrorCB session_error_cb_; + media::LegacySessionErrorCB legacy_session_error_cb_; media::SessionKeysChangeCB session_keys_change_cb_; media::SessionExpirationUpdateCB session_expiration_update_cb_; diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc index b58627f..f949129 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc @@ -2493,12 +2493,13 @@ void PepperPluginInstanceImpl::SessionClosed(PP_Instance instance, content_decryptor_delegate_->OnSessionClosed(session_id_var); } -void PepperPluginInstanceImpl::SessionError(PP_Instance instance, - PP_Var session_id_var, - PP_CdmExceptionCode exception_code, - uint32 system_code, - PP_Var error_description_var) { - content_decryptor_delegate_->OnSessionError( +void PepperPluginInstanceImpl::LegacySessionError( + PP_Instance instance, + PP_Var session_id_var, + PP_CdmExceptionCode exception_code, + uint32 system_code, + PP_Var error_description_var) { + content_decryptor_delegate_->OnLegacySessionError( session_id_var, exception_code, system_code, error_description_var); } diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h index 12eb6a2..0968744 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.h +++ b/content/renderer/pepper/pepper_plugin_instance_impl.h @@ -491,11 +491,11 @@ class CONTENT_EXPORT PepperPluginInstanceImpl PP_Var session_id_var, PP_Time new_expiry_time) override; void SessionClosed(PP_Instance instance, PP_Var session_id_var) override; - void SessionError(PP_Instance instance, - PP_Var session_id_var, - PP_CdmExceptionCode exception_code, - uint32 system_code, - PP_Var error_description_var) override; + void LegacySessionError(PP_Instance instance, + PP_Var session_id_var, + PP_CdmExceptionCode exception_code, + uint32 system_code, + PP_Var error_description_var) override; void DeliverBlock(PP_Instance instance, PP_Resource decrypted_block, const PP_DecryptedBlockInfo* block_info) override; diff --git a/media/base/android/browser_cdm_factory_android.cc b/media/base/android/browser_cdm_factory_android.cc index 43f586f..475af4c 100644 --- a/media/base/android/browser_cdm_factory_android.cc +++ b/media/base/android/browser_cdm_factory_android.cc @@ -18,7 +18,7 @@ scoped_ptr<BrowserCdm> BrowserCdmFactoryAndroid::CreateBrowserCdm( bool use_secure_surface, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb) { if (!MediaDrmBridge::IsKeySystemSupported(key_system)) { @@ -26,9 +26,10 @@ scoped_ptr<BrowserCdm> BrowserCdmFactoryAndroid::CreateBrowserCdm( return scoped_ptr<BrowserCdm>(); } - scoped_ptr<MediaDrmBridge> cdm(MediaDrmBridge::Create( - key_system, session_message_cb, session_closed_cb, session_error_cb, - session_keys_change_cb, session_expiration_update_cb)); + scoped_ptr<MediaDrmBridge> cdm( + MediaDrmBridge::Create(key_system, session_message_cb, session_closed_cb, + legacy_session_error_cb, session_keys_change_cb, + session_expiration_update_cb)); if (!cdm) { NOTREACHED() << "MediaDrmBridge cannot be created for " << key_system; return scoped_ptr<BrowserCdm>(); diff --git a/media/base/android/browser_cdm_factory_android.h b/media/base/android/browser_cdm_factory_android.h index 17c61f7..4f83432 100644 --- a/media/base/android/browser_cdm_factory_android.h +++ b/media/base/android/browser_cdm_factory_android.h @@ -21,7 +21,7 @@ class MEDIA_EXPORT BrowserCdmFactoryAndroid : public BrowserCdmFactory { bool use_secure_surface, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb) final; diff --git a/media/base/android/media_drm_bridge.cc b/media/base/android/media_drm_bridge.cc index 65ce4fc..0e31818 100644 --- a/media/base/android/media_drm_bridge.cc +++ b/media/base/android/media_drm_bridge.cc @@ -348,12 +348,12 @@ MediaDrmBridge::MediaDrmBridge( const std::vector<uint8>& scheme_uuid, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb) : scheme_uuid_(scheme_uuid), session_message_cb_(session_message_cb), session_closed_cb_(session_closed_cb), - session_error_cb_(session_error_cb), + legacy_session_error_cb_(legacy_session_error_cb), session_keys_change_cb_(session_keys_change_cb) { JNIEnv* env = AttachCurrentThread(); CHECK(env); @@ -377,7 +377,7 @@ scoped_ptr<MediaDrmBridge> MediaDrmBridge::Create( const std::string& key_system, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& /* session_expiration_update_cb */) { scoped_ptr<MediaDrmBridge> media_drm_bridge; @@ -388,9 +388,9 @@ scoped_ptr<MediaDrmBridge> MediaDrmBridge::Create( if (scheme_uuid.empty()) return media_drm_bridge.Pass(); - media_drm_bridge.reset(new MediaDrmBridge(scheme_uuid, session_message_cb, - session_closed_cb, session_error_cb, - session_keys_change_cb)); + media_drm_bridge.reset( + new MediaDrmBridge(scheme_uuid, session_message_cb, session_closed_cb, + legacy_session_error_cb, session_keys_change_cb)); if (media_drm_bridge->j_media_drm_.is_null()) media_drm_bridge.reset(); @@ -402,7 +402,7 @@ scoped_ptr<MediaDrmBridge> MediaDrmBridge::Create( scoped_ptr<MediaDrmBridge> MediaDrmBridge::CreateWithoutSessionSupport( const std::string& key_system) { return MediaDrmBridge::Create( - key_system, SessionMessageCB(), SessionClosedCB(), SessionErrorCB(), + key_system, SessionMessageCB(), SessionClosedCB(), LegacySessionErrorCB(), SessionKeysChangeCB(), SessionExpirationUpdateCB()); } @@ -625,8 +625,8 @@ void MediaDrmBridge::OnLegacySessionError(JNIEnv* env, jbyteArray j_session_id, jstring j_error_message) { std::string error_message = ConvertJavaStringToUTF8(env, j_error_message); - session_error_cb_.Run(GetSessionId(env, j_session_id), - MediaKeys::UNKNOWN_ERROR, 0, error_message); + legacy_session_error_cb_.Run(GetSessionId(env, j_session_id), + MediaKeys::UNKNOWN_ERROR, 0, error_message); } ScopedJavaLocalRef<jobject> MediaDrmBridge::GetMediaCrypto() { diff --git a/media/base/android/media_drm_bridge.h b/media/base/android/media_drm_bridge.h index a1ca70d..b767aa6 100644 --- a/media/base/android/media_drm_bridge.h +++ b/media/base/android/media_drm_bridge.h @@ -65,7 +65,7 @@ class MEDIA_EXPORT MediaDrmBridge : public BrowserCdm { const std::string& key_system, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb); @@ -184,7 +184,7 @@ class MEDIA_EXPORT MediaDrmBridge : public BrowserCdm { MediaDrmBridge(const std::vector<uint8>& scheme_uuid, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb); static bool IsSecureDecoderRequired(SecurityLevel security_level); @@ -201,7 +201,7 @@ class MEDIA_EXPORT MediaDrmBridge : public BrowserCdm { // Callbacks for firing session events. SessionMessageCB session_message_cb_; SessionClosedCB session_closed_cb_; - SessionErrorCB session_error_cb_; + LegacySessionErrorCB legacy_session_error_cb_; SessionKeysChangeCB session_keys_change_cb_; base::Closure media_crypto_ready_cb_; diff --git a/media/base/browser_cdm_factory.cc b/media/base/browser_cdm_factory.cc index 46e96f5..ac0894f 100644 --- a/media/base/browser_cdm_factory.cc +++ b/media/base/browser_cdm_factory.cc @@ -26,7 +26,7 @@ scoped_ptr<BrowserCdm> CreateBrowserCdm( bool use_secure_surface, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb) { if (!g_cdm_factory) { @@ -40,7 +40,8 @@ scoped_ptr<BrowserCdm> CreateBrowserCdm( return g_cdm_factory->CreateBrowserCdm( key_system, use_secure_surface, session_message_cb, session_closed_cb, - session_error_cb, session_keys_change_cb, session_expiration_update_cb); + legacy_session_error_cb, session_keys_change_cb, + session_expiration_update_cb); } } // namespace media diff --git a/media/base/browser_cdm_factory.h b/media/base/browser_cdm_factory.h index ecce0be..b2ff0c7 100644 --- a/media/base/browser_cdm_factory.h +++ b/media/base/browser_cdm_factory.h @@ -24,7 +24,7 @@ class MEDIA_EXPORT BrowserCdmFactory { bool use_secure_surface, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb) = 0; @@ -46,7 +46,7 @@ CreateBrowserCdm(const std::string& key_system, bool use_secure_surface, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb); diff --git a/media/base/cdm_factory.h b/media/base/cdm_factory.h index 918e623..2a9b42d 100644 --- a/media/base/cdm_factory.h +++ b/media/base/cdm_factory.h @@ -27,7 +27,7 @@ class MEDIA_EXPORT CdmFactory { const GURL& security_origin, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb) = 0; diff --git a/media/base/media_keys.h b/media/base/media_keys.h index e9fb93c..796d78d 100644 --- a/media/base/media_keys.h +++ b/media/base/media_keys.h @@ -164,7 +164,8 @@ typedef base::Callback<void(const std::string& session_id)> SessionClosedCB; typedef base::Callback<void(const std::string& session_id, MediaKeys::Exception exception, uint32 system_code, - const std::string& error_message)> SessionErrorCB; + const std::string& error_message)> + LegacySessionErrorCB; typedef base::Callback<void(const std::string& session_id, bool has_additional_usable_key, diff --git a/media/blink/cdm_session_adapter.cc b/media/blink/cdm_session_adapter.cc index c77efb7..79f5054 100644 --- a/media/blink/cdm_session_adapter.cc +++ b/media/blink/cdm_session_adapter.cc @@ -41,7 +41,7 @@ bool CdmSessionAdapter::Initialize(CdmFactory* cdm_factory, security_origin, base::Bind(&CdmSessionAdapter::OnSessionMessage, weak_this), base::Bind(&CdmSessionAdapter::OnSessionClosed, weak_this), - base::Bind(&CdmSessionAdapter::OnSessionError, weak_this), + base::Bind(&CdmSessionAdapter::OnLegacySessionError, weak_this), base::Bind(&CdmSessionAdapter::OnSessionKeysChange, weak_this), base::Bind(&CdmSessionAdapter::OnSessionExpirationUpdate, weak_this)); return media_keys_.get() != nullptr; @@ -163,10 +163,11 @@ void CdmSessionAdapter::OnSessionClosed(const std::string& session_id) { session->OnSessionClosed(); } -void CdmSessionAdapter::OnSessionError(const std::string& session_id, - MediaKeys::Exception exception_code, - uint32 system_code, - const std::string& error_message) { +void CdmSessionAdapter::OnLegacySessionError( + const std::string& session_id, + MediaKeys::Exception exception_code, + uint32 system_code, + const std::string& error_message) { // Error events not used by unprefixed EME. // TODO(jrummell): Remove when prefixed EME removed. } diff --git a/media/blink/cdm_session_adapter.h b/media/blink/cdm_session_adapter.h index f806ee8..e35c4cb 100644 --- a/media/blink/cdm_session_adapter.h +++ b/media/blink/cdm_session_adapter.h @@ -116,10 +116,10 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> { void OnSessionExpirationUpdate(const std::string& session_id, const base::Time& new_expiry_time); void OnSessionClosed(const std::string& session_id); - void OnSessionError(const std::string& session_id, - MediaKeys::Exception exception_code, - uint32 system_code, - const std::string& error_message); + void OnLegacySessionError(const std::string& session_id, + MediaKeys::Exception exception_code, + uint32 system_code, + const std::string& error_message); // Helper function of the callbacks. WebContentDecryptionModuleSessionImpl* GetSession( diff --git a/media/cdm/default_cdm_factory.cc b/media/cdm/default_cdm_factory.cc index 94aae93..9d8ea83 100644 --- a/media/cdm/default_cdm_factory.cc +++ b/media/cdm/default_cdm_factory.cc @@ -22,7 +22,7 @@ scoped_ptr<MediaKeys> DefaultCdmFactory::Create( const GURL& security_origin, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb) { if (CanUseAesDecryptor(key_system)) { diff --git a/media/cdm/default_cdm_factory.h b/media/cdm/default_cdm_factory.h index d9528808..72e0e8d 100644 --- a/media/cdm/default_cdm_factory.h +++ b/media/cdm/default_cdm_factory.h @@ -23,7 +23,7 @@ class DefaultCdmFactory : public CdmFactory { const GURL& security_origin, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb) final; diff --git a/media/cdm/ppapi/cdm_adapter.cc b/media/cdm/ppapi/cdm_adapter.cc index db7b38d..1d765d0 100644 --- a/media/cdm/ppapi/cdm_adapter.cc +++ b/media/cdm/ppapi/cdm_adapter.cc @@ -862,7 +862,7 @@ void CdmAdapter::SendSessionErrorInternal(int32_t result, const std::string& session_id, const SessionError& error) { PP_DCHECK(result == PP_OK); - pp::ContentDecryptor_Private::SessionError( + pp::ContentDecryptor_Private::LegacySessionError( session_id, CdmExceptionTypeToPpCdmExceptionType(error.error), error.system_code, error.error_description); } diff --git a/media/cdm/proxy_decryptor.cc b/media/cdm/proxy_decryptor.cc index 75013bf..b9f3b78 100644 --- a/media/cdm/proxy_decryptor.cc +++ b/media/cdm/proxy_decryptor.cc @@ -99,14 +99,12 @@ bool ProxyDecryptor::GenerateKeyRequest(const std::string& init_data_type, StripHeader(init_data_vector, strlen(kPrefixedApiPersistentSessionHeader)); } - scoped_ptr<NewSessionCdmPromise> promise( - new CdmCallbackPromise<std::string>( - base::Bind(&ProxyDecryptor::SetSessionId, - weak_ptr_factory_.GetWeakPtr(), - session_creation_type), - base::Bind(&ProxyDecryptor::OnSessionError, - weak_ptr_factory_.GetWeakPtr(), - std::string()))); // No session id until created. + scoped_ptr<NewSessionCdmPromise> promise(new CdmCallbackPromise<std::string>( + base::Bind(&ProxyDecryptor::SetSessionId, weak_ptr_factory_.GetWeakPtr(), + session_creation_type), + base::Bind(&ProxyDecryptor::OnLegacySessionError, + weak_ptr_factory_.GetWeakPtr(), + std::string()))); // No session id until created. if (session_creation_type == LoadSession) { media_keys_->LoadSession( @@ -178,10 +176,8 @@ void ProxyDecryptor::AddKey(const uint8* key, base::hash_map<std::string, bool>::iterator it = active_sessions_.begin(); new_session_id = it->first; } else { - OnSessionError(std::string(), - MediaKeys::NOT_SUPPORTED_ERROR, - 0, - "SessionId not specified."); + OnLegacySessionError(std::string(), MediaKeys::NOT_SUPPORTED_ERROR, 0, + "SessionId not specified."); return; } } @@ -189,7 +185,7 @@ void ProxyDecryptor::AddKey(const uint8* key, scoped_ptr<SimpleCdmPromise> promise(new CdmCallbackPromise<>( base::Bind(&ProxyDecryptor::GenerateKeyAdded, weak_ptr_factory_.GetWeakPtr(), session_id), - base::Bind(&ProxyDecryptor::OnSessionError, + base::Bind(&ProxyDecryptor::OnLegacySessionError, weak_ptr_factory_.GetWeakPtr(), session_id))); // EME WD spec only supports a single array passed to the CDM. For @@ -223,7 +219,7 @@ void ProxyDecryptor::CancelKeyRequest(const std::string& session_id) { scoped_ptr<SimpleCdmPromise> promise(new CdmCallbackPromise<>( base::Bind(&ProxyDecryptor::OnSessionClosed, weak_ptr_factory_.GetWeakPtr(), session_id), - base::Bind(&ProxyDecryptor::OnSessionError, + base::Bind(&ProxyDecryptor::OnLegacySessionError, weak_ptr_factory_.GetWeakPtr(), session_id))); media_keys_->RemoveSession(session_id, promise.Pass()); } @@ -239,13 +235,10 @@ scoped_ptr<MediaKeys> ProxyDecryptor::CreateMediaKeys( bool allow_persistent_state = true; base::WeakPtr<ProxyDecryptor> weak_this = weak_ptr_factory_.GetWeakPtr(); return cdm_factory->Create( - key_system, - allow_distinctive_identifier, - allow_persistent_state, - security_origin, - base::Bind(&ProxyDecryptor::OnSessionMessage, weak_this), + key_system, allow_distinctive_identifier, allow_persistent_state, + security_origin, base::Bind(&ProxyDecryptor::OnSessionMessage, weak_this), base::Bind(&ProxyDecryptor::OnSessionClosed, weak_this), - base::Bind(&ProxyDecryptor::OnSessionError, weak_this), + base::Bind(&ProxyDecryptor::OnLegacySessionError, weak_this), base::Bind(&ProxyDecryptor::OnSessionKeysChange, weak_this), base::Bind(&ProxyDecryptor::OnSessionExpirationUpdate, weak_this)); } @@ -303,17 +296,17 @@ void ProxyDecryptor::OnSessionClosed(const std::string& session_id) { return; if (it->second) { - OnSessionError(session_id, MediaKeys::NOT_SUPPORTED_ERROR, - kSessionClosedSystemCode, - "Do not close persistent sessions."); + OnLegacySessionError(session_id, MediaKeys::NOT_SUPPORTED_ERROR, + kSessionClosedSystemCode, + "Do not close persistent sessions."); } active_sessions_.erase(it); } -void ProxyDecryptor::OnSessionError(const std::string& session_id, - MediaKeys::Exception exception_code, - uint32 system_code, - const std::string& error_message) { +void ProxyDecryptor::OnLegacySessionError(const std::string& session_id, + MediaKeys::Exception exception_code, + uint32 system_code, + const std::string& error_message) { // Convert |error_name| back to MediaKeys::KeyError if possible. Prefixed // EME has different error message, so all the specific error events will // get lost. diff --git a/media/cdm/proxy_decryptor.h b/media/cdm/proxy_decryptor.h index e3a3fe4..16c2f92 100644 --- a/media/cdm/proxy_decryptor.h +++ b/media/cdm/proxy_decryptor.h @@ -83,10 +83,10 @@ class MEDIA_EXPORT ProxyDecryptor { const base::Time& new_expiry_time); void GenerateKeyAdded(const std::string& session_id); void OnSessionClosed(const std::string& session_id); - void OnSessionError(const std::string& session_id, - MediaKeys::Exception exception_code, - uint32 system_code, - const std::string& error_message); + void OnLegacySessionError(const std::string& session_id, + MediaKeys::Exception exception_code, + uint32 system_code, + const std::string& error_message); // Callback for permission request. void OnPermissionStatus(MediaKeys::SessionType session_type, diff --git a/media/mojo/interfaces/content_decryption_module.mojom b/media/mojo/interfaces/content_decryption_module.mojom index 65afab3..24d4072 100644 --- a/media/mojo/interfaces/content_decryption_module.mojom +++ b/media/mojo/interfaces/content_decryption_module.mojom @@ -132,8 +132,8 @@ interface ContentDecryptionModuleClient { OnSessionClosed(string session_id); - OnSessionError(string session_id, CdmException exception, - uint32 system_code, string error_message); + OnLegacySessionError(string session_id, CdmException exception, + uint32 system_code, string error_message); OnSessionKeysChange(string session_id, bool has_additional_usable_key, array<CdmKeyInformation> key_information); diff --git a/media/mojo/services/mojo_cdm.cc b/media/mojo/services/mojo_cdm.cc index 58236d8..df82ec9 100644 --- a/media/mojo/services/mojo_cdm.cc +++ b/media/mojo/services/mojo_cdm.cc @@ -35,21 +35,21 @@ static void RejectPromise(scoped_ptr<PromiseType> promise, MojoCdm::MojoCdm(mojo::ContentDecryptionModulePtr remote_cdm, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb) : remote_cdm_(remote_cdm.Pass()), binding_(this), session_message_cb_(session_message_cb), session_closed_cb_(session_closed_cb), - session_error_cb_(session_error_cb), + legacy_session_error_cb_(legacy_session_error_cb), session_keys_change_cb_(session_keys_change_cb), session_expiration_update_cb_(session_expiration_update_cb), weak_factory_(this) { DVLOG(1) << __FUNCTION__; DCHECK(!session_message_cb_.is_null()); DCHECK(!session_closed_cb_.is_null()); - DCHECK(!session_error_cb_.is_null()); + DCHECK(!legacy_session_error_cb_.is_null()); DCHECK(!session_keys_change_cb_.is_null()); DCHECK(!session_expiration_update_cb_.is_null()); @@ -144,13 +144,13 @@ void MojoCdm::OnSessionClosed(const mojo::String& session_id) { session_closed_cb_.Run(session_id); } -void MojoCdm::OnSessionError(const mojo::String& session_id, - mojo::CdmException exception, - uint32_t system_code, - const mojo::String& error_message) { - session_error_cb_.Run(session_id, - static_cast<MediaKeys::Exception>(exception), - system_code, error_message); +void MojoCdm::OnLegacySessionError(const mojo::String& session_id, + mojo::CdmException exception, + uint32_t system_code, + const mojo::String& error_message) { + legacy_session_error_cb_.Run(session_id, + static_cast<MediaKeys::Exception>(exception), + system_code, error_message); } void MojoCdm::OnSessionKeysChange( diff --git a/media/mojo/services/mojo_cdm.h b/media/mojo/services/mojo_cdm.h index 53d494f..4c29577 100644 --- a/media/mojo/services/mojo_cdm.h +++ b/media/mojo/services/mojo_cdm.h @@ -27,7 +27,7 @@ class MojoCdm : public MediaKeys, public mojo::ContentDecryptionModuleClient { MojoCdm(mojo::ContentDecryptionModulePtr remote_cdm, const SessionMessageCB& session_message_cb, const SessionClosedCB& session_closed_cb, - const SessionErrorCB& session_error_cb, + const LegacySessionErrorCB& legacy_session_error_cb, const SessionKeysChangeCB& session_keys_change_cb, const SessionExpirationUpdateCB& session_expiration_update_cb); ~MojoCdm() final; @@ -62,10 +62,10 @@ class MojoCdm : public MediaKeys, public mojo::ContentDecryptionModuleClient { mojo::Array<uint8_t> message, const mojo::String& legacy_destination_url) final; void OnSessionClosed(const mojo::String& session_id) final; - void OnSessionError(const mojo::String& session_id, - mojo::CdmException exception, - uint32_t system_code, - const mojo::String& error_message) final; + void OnLegacySessionError(const mojo::String& session_id, + mojo::CdmException exception, + uint32_t system_code, + const mojo::String& error_message) final; void OnSessionKeysChange( const mojo::String& session_id, bool has_additional_usable_key, @@ -93,7 +93,7 @@ class MojoCdm : public MediaKeys, public mojo::ContentDecryptionModuleClient { // Callbacks for firing session events. SessionMessageCB session_message_cb_; SessionClosedCB session_closed_cb_; - SessionErrorCB session_error_cb_; + LegacySessionErrorCB legacy_session_error_cb_; SessionKeysChangeCB session_keys_change_cb_; SessionExpirationUpdateCB session_expiration_update_cb_; diff --git a/media/mojo/services/mojo_cdm_service.cc b/media/mojo/services/mojo_cdm_service.cc index b278189..eff147f 100644 --- a/media/mojo/services/mojo_cdm_service.cc +++ b/media/mojo/services/mojo_cdm_service.cc @@ -143,13 +143,13 @@ void MojoCdmService::OnSessionClosed(const std::string& session_id) { client_->OnSessionClosed(session_id); } -void MojoCdmService::OnSessionError(const std::string& session_id, - MediaKeys::Exception exception, - uint32_t system_code, - const std::string& error_message) { - client_->OnSessionError(session_id, - static_cast<mojo::CdmException>(exception), - system_code, error_message); +void MojoCdmService::OnLegacySessionError(const std::string& session_id, + MediaKeys::Exception exception, + uint32_t system_code, + const std::string& error_message) { + client_->OnLegacySessionError(session_id, + static_cast<mojo::CdmException>(exception), + system_code, error_message); } } // namespace media diff --git a/media/mojo/services/mojo_cdm_service.h b/media/mojo/services/mojo_cdm_service.h index ff30e9b..a1b1ea0 100644 --- a/media/mojo/services/mojo_cdm_service.h +++ b/media/mojo/services/mojo_cdm_service.h @@ -62,10 +62,10 @@ class MojoCdmService void OnSessionExpirationUpdate(const std::string& session_id, const base::Time& new_expiry_time); void OnSessionClosed(const std::string& session_id); - void OnSessionError(const std::string& session_id, - MediaKeys::Exception exception, - uint32_t system_code, - const std::string& error_message); + void OnLegacySessionError(const std::string& session_id, + MediaKeys::Exception exception, + uint32_t system_code, + const std::string& error_message); scoped_ptr<MediaKeys> cdm_; diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc index 5042160..118f1f7 100644 --- a/media/test/pipeline_integration_test.cc +++ b/media/test/pipeline_integration_test.cc @@ -158,10 +158,10 @@ class FakeEncryptedMedia { CdmKeysInfo keys_info) = 0; // Errors are not expected unless overridden. - virtual void OnSessionError(const std::string& session_id, - const std::string& error_name, - uint32 system_code, - const std::string& error_message) { + virtual void OnLegacySessionError(const std::string& session_id, + const std::string& error_name, + uint32 system_code, + const std::string& error_message) { FAIL() << "Unexpected Key Error"; } @@ -202,11 +202,12 @@ class FakeEncryptedMedia { keys_info.Pass()); } - void OnSessionError(const std::string& session_id, - const std::string& error_name, - uint32 system_code, - const std::string& error_message) { - app_->OnSessionError(session_id, error_name, system_code, error_message); + void OnLegacySessionError(const std::string& session_id, + const std::string& error_name, + uint32 system_code, + const std::string& error_message) { + app_->OnLegacySessionError(session_id, error_name, system_code, + error_message); } void OnEncryptedMediaInitData(const std::string& init_data_type, diff --git a/ppapi/api/private/ppb_content_decryptor_private.idl b/ppapi/api/private/ppb_content_decryptor_private.idl index dcb9220..602bf12 100644 --- a/ppapi/api/private/ppb_content_decryptor_private.idl +++ b/ppapi/api/private/ppb_content_decryptor_private.idl @@ -12,7 +12,7 @@ [generate_thunk] label Chrome { - M41 = 0.13 + M44 = 0.14 }; /** @@ -170,7 +170,7 @@ interface PPB_ContentDecryptor_Private { * @param[in] error_description A <code>PP_Var</code> of type * <code>PP_VARTYPE_STRING</code> containing the error description. */ - void SessionError( + void LegacySessionError( [in] PP_Instance instance, [in] PP_Var session_id, [in] PP_CdmExceptionCode exception_code, diff --git a/ppapi/c/pp_macros.h b/ppapi/c/pp_macros.h index 7901c90..28b6c3a 100644 --- a/ppapi/c/pp_macros.h +++ b/ppapi/c/pp_macros.h @@ -3,13 +3,13 @@ * found in the LICENSE file. */ -/* From pp_macros.idl modified Thu Feb 19 13:24:05 2015. */ +/* From pp_macros.idl modified Tue Dec 9 11:24:44 2014. */ #ifndef PPAPI_C_PP_MACROS_H_ #define PPAPI_C_PP_MACROS_H_ -#define PPAPI_RELEASE 43 +#define PPAPI_RELEASE 44 /** * @file diff --git a/ppapi/c/private/ppb_content_decryptor_private.h b/ppapi/c/private/ppb_content_decryptor_private.h index 61cae0d..e5493fa 100644 --- a/ppapi/c/private/ppb_content_decryptor_private.h +++ b/ppapi/c/private/ppb_content_decryptor_private.h @@ -4,7 +4,7 @@ */ /* From private/ppb_content_decryptor_private.idl, - * modified Mon Jan 12 17:33:29 2015. + * modified Mon Mar 30 22:35:33 2015. */ #ifndef PPAPI_C_PRIVATE_PPB_CONTENT_DECRYPTOR_PRIVATE_H_ @@ -19,10 +19,10 @@ #include "ppapi/c/pp_var.h" #include "ppapi/c/private/pp_content_decryptor.h" -#define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_13 \ - "PPB_ContentDecryptor_Private;0.13" +#define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_14 \ + "PPB_ContentDecryptor_Private;0.14" #define PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE \ - PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_13 + PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_14 /** * @file @@ -43,7 +43,7 @@ * browser side support for the Content Decryption Module (CDM) for Encrypted * Media Extensions: http://www.w3.org/TR/encrypted-media/ */ -struct PPB_ContentDecryptor_Private_0_13 { +struct PPB_ContentDecryptor_Private_0_14 { /** * A promise has been resolved by the CDM. * @@ -174,11 +174,11 @@ struct PPB_ContentDecryptor_Private_0_13 { * @param[in] error_description A <code>PP_Var</code> of type * <code>PP_VARTYPE_STRING</code> containing the error description. */ - void (*SessionError)(PP_Instance instance, - struct PP_Var session_id, - PP_CdmExceptionCode exception_code, - uint32_t system_code, - struct PP_Var error_description); + void (*LegacySessionError)(PP_Instance instance, + struct PP_Var session_id, + PP_CdmExceptionCode exception_code, + uint32_t system_code, + struct PP_Var error_description); /** * Called after the <code>Decrypt()</code> method on the * <code>PPP_ContentDecryptor_Private</code> interface completes to @@ -308,7 +308,7 @@ struct PPB_ContentDecryptor_Private_0_13 { const struct PP_DecryptedSampleInfo* decrypted_sample_info); }; -typedef struct PPB_ContentDecryptor_Private_0_13 PPB_ContentDecryptor_Private; +typedef struct PPB_ContentDecryptor_Private_0_14 PPB_ContentDecryptor_Private; /** * @} */ diff --git a/ppapi/cpp/private/content_decryptor_private.cc b/ppapi/cpp/private/content_decryptor_private.cc index e390ccc..d14bd0e 100644 --- a/ppapi/cpp/private/content_decryptor_private.cc +++ b/ppapi/cpp/private/content_decryptor_private.cc @@ -353,7 +353,7 @@ void ContentDecryptor_Private::SessionClosed(const std::string& session_id) { } } -void ContentDecryptor_Private::SessionError( +void ContentDecryptor_Private::LegacySessionError( const std::string& session_id, PP_CdmExceptionCode exception_code, uint32_t system_code, @@ -361,7 +361,7 @@ void ContentDecryptor_Private::SessionError( if (has_interface<PPB_ContentDecryptor_Private>()) { pp::Var session_id_var(session_id); pp::Var error_description_var(error_description); - get_interface<PPB_ContentDecryptor_Private>()->SessionError( + get_interface<PPB_ContentDecryptor_Private>()->LegacySessionError( associated_instance_.pp_instance(), session_id_var.pp_var(), exception_code, system_code, error_description_var.pp_var()); } diff --git a/ppapi/cpp/private/content_decryptor_private.h b/ppapi/cpp/private/content_decryptor_private.h index 39bfdd7..1b18b3a 100644 --- a/ppapi/cpp/private/content_decryptor_private.h +++ b/ppapi/cpp/private/content_decryptor_private.h @@ -91,10 +91,10 @@ class ContentDecryptor_Private { void SessionExpirationChange(const std::string& session_id, PP_Time new_expiry_time); void SessionClosed(const std::string& session_id); - void SessionError(const std::string& session_id, - PP_CdmExceptionCode exception_code, - uint32_t system_code, - const std::string& error_description); + void LegacySessionError(const std::string& session_id, + PP_CdmExceptionCode exception_code, + uint32_t system_code, + const std::string& error_description); // The plugin must not hold a reference to the encrypted buffer resource // provided to Decrypt() when it calls this method. The browser will reuse diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index ed8be96..26b2bdd 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -166,7 +166,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoCapture_Dev_0_3; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoDecoder_Dev_0_16; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Selection_Dev_0_3; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_CameraDevice_Private_0_1; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13; +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_DisplayColorProfile_Private_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Ext_CrxFileSystem_Private_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_FileIO_Private_0_1; @@ -3009,79 +3009,79 @@ static int32_t Pnacl_M42_PPB_CameraDevice_Private_GetCameraCapabilities(PP_Resou /* End wrapper methods for PPB_CameraDevice_Private_0_1 */ -/* Begin wrapper methods for PPB_ContentDecryptor_Private_0_13 */ +/* Begin wrapper methods for PPB_ContentDecryptor_Private_0_14 */ -static void Pnacl_M41_PPB_ContentDecryptor_Private_PromiseResolved(PP_Instance instance, uint32_t promise_id) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_PromiseResolved(PP_Instance instance, uint32_t promise_id) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->PromiseResolved(instance, promise_id); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_PromiseResolvedWithSession(PP_Instance instance, uint32_t promise_id, struct PP_Var* session_id) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_PromiseResolvedWithSession(PP_Instance instance, uint32_t promise_id, struct PP_Var* session_id) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->PromiseResolvedWithSession(instance, promise_id, *session_id); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_PromiseRejected(PP_Instance instance, uint32_t promise_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var* error_description) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_PromiseRejected(PP_Instance instance, uint32_t promise_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var* error_description) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->PromiseRejected(instance, promise_id, exception_code, system_code, *error_description); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_SessionMessage(PP_Instance instance, struct PP_Var* session_id, PP_CdmMessageType message_type, struct PP_Var* message, struct PP_Var* legacy_destination_url) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_SessionMessage(PP_Instance instance, struct PP_Var* session_id, PP_CdmMessageType message_type, struct PP_Var* message, struct PP_Var* legacy_destination_url) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->SessionMessage(instance, *session_id, message_type, *message, *legacy_destination_url); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_SessionKeysChange(PP_Instance instance, struct PP_Var* session_id, PP_Bool has_additional_usable_key, uint32_t key_count, const struct PP_KeyInformation key_information[]) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_SessionKeysChange(PP_Instance instance, struct PP_Var* session_id, PP_Bool has_additional_usable_key, uint32_t key_count, const struct PP_KeyInformation key_information[]) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->SessionKeysChange(instance, *session_id, has_additional_usable_key, key_count, key_information); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_SessionExpirationChange(PP_Instance instance, struct PP_Var* session_id, PP_Time new_expiry_time) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_SessionExpirationChange(PP_Instance instance, struct PP_Var* session_id, PP_Time new_expiry_time) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->SessionExpirationChange(instance, *session_id, new_expiry_time); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_SessionClosed(PP_Instance instance, struct PP_Var* session_id) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_SessionClosed(PP_Instance instance, struct PP_Var* session_id) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->SessionClosed(instance, *session_id); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_SessionError(PP_Instance instance, struct PP_Var* session_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var* error_description) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; - iface->SessionError(instance, *session_id, exception_code, system_code, *error_description); +static void Pnacl_M44_PPB_ContentDecryptor_Private_LegacySessionError(PP_Instance instance, struct PP_Var* session_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var* error_description) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; + iface->LegacySessionError(instance, *session_id, exception_code, system_code, *error_description); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_DeliverBlock(PP_Instance instance, PP_Resource decrypted_block, const struct PP_DecryptedBlockInfo* decrypted_block_info) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_DeliverBlock(PP_Instance instance, PP_Resource decrypted_block, const struct PP_DecryptedBlockInfo* decrypted_block_info) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->DeliverBlock(instance, decrypted_block, decrypted_block_info); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_DecoderInitializeDone(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id, PP_Bool success) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_DecoderInitializeDone(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id, PP_Bool success) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->DecoderInitializeDone(instance, decoder_type, request_id, success); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_DecoderDeinitializeDone(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_DecoderDeinitializeDone(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->DecoderDeinitializeDone(instance, decoder_type, request_id); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_DecoderResetDone(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_DecoderResetDone(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->DecoderResetDone(instance, decoder_type, request_id); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_DeliverFrame(PP_Instance instance, PP_Resource decrypted_frame, const struct PP_DecryptedFrameInfo* decrypted_frame_info) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_DeliverFrame(PP_Instance instance, PP_Resource decrypted_frame, const struct PP_DecryptedFrameInfo* decrypted_frame_info) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->DeliverFrame(instance, decrypted_frame, decrypted_frame_info); } -static void Pnacl_M41_PPB_ContentDecryptor_Private_DeliverSamples(PP_Instance instance, PP_Resource audio_frames, const struct PP_DecryptedSampleInfo* decrypted_sample_info) { - const struct PPB_ContentDecryptor_Private_0_13 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13.real_iface; +static void Pnacl_M44_PPB_ContentDecryptor_Private_DeliverSamples(PP_Instance instance, PP_Resource audio_frames, const struct PP_DecryptedSampleInfo* decrypted_sample_info) { + const struct PPB_ContentDecryptor_Private_0_14 *iface = Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14.real_iface; iface->DeliverSamples(instance, audio_frames, decrypted_sample_info); } -/* End wrapper methods for PPB_ContentDecryptor_Private_0_13 */ +/* End wrapper methods for PPB_ContentDecryptor_Private_0_14 */ /* Begin wrapper methods for PPB_DisplayColorProfile_Private_0_1 */ @@ -5368,21 +5368,21 @@ static const struct PPB_CameraDevice_Private_0_1 Pnacl_Wrappers_PPB_CameraDevice .GetCameraCapabilities = (int32_t (*)(PP_Resource camera_device, PP_Resource* capabilities, struct PP_CompletionCallback callback))&Pnacl_M42_PPB_CameraDevice_Private_GetCameraCapabilities }; -static const struct PPB_ContentDecryptor_Private_0_13 Pnacl_Wrappers_PPB_ContentDecryptor_Private_0_13 = { - .PromiseResolved = (void (*)(PP_Instance instance, uint32_t promise_id))&Pnacl_M41_PPB_ContentDecryptor_Private_PromiseResolved, - .PromiseResolvedWithSession = (void (*)(PP_Instance instance, uint32_t promise_id, struct PP_Var session_id))&Pnacl_M41_PPB_ContentDecryptor_Private_PromiseResolvedWithSession, - .PromiseRejected = (void (*)(PP_Instance instance, uint32_t promise_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var error_description))&Pnacl_M41_PPB_ContentDecryptor_Private_PromiseRejected, - .SessionMessage = (void (*)(PP_Instance instance, struct PP_Var session_id, PP_CdmMessageType message_type, struct PP_Var message, struct PP_Var legacy_destination_url))&Pnacl_M41_PPB_ContentDecryptor_Private_SessionMessage, - .SessionKeysChange = (void (*)(PP_Instance instance, struct PP_Var session_id, PP_Bool has_additional_usable_key, uint32_t key_count, const struct PP_KeyInformation key_information[]))&Pnacl_M41_PPB_ContentDecryptor_Private_SessionKeysChange, - .SessionExpirationChange = (void (*)(PP_Instance instance, struct PP_Var session_id, PP_Time new_expiry_time))&Pnacl_M41_PPB_ContentDecryptor_Private_SessionExpirationChange, - .SessionClosed = (void (*)(PP_Instance instance, struct PP_Var session_id))&Pnacl_M41_PPB_ContentDecryptor_Private_SessionClosed, - .SessionError = (void (*)(PP_Instance instance, struct PP_Var session_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var error_description))&Pnacl_M41_PPB_ContentDecryptor_Private_SessionError, - .DeliverBlock = (void (*)(PP_Instance instance, PP_Resource decrypted_block, const struct PP_DecryptedBlockInfo* decrypted_block_info))&Pnacl_M41_PPB_ContentDecryptor_Private_DeliverBlock, - .DecoderInitializeDone = (void (*)(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id, PP_Bool success))&Pnacl_M41_PPB_ContentDecryptor_Private_DecoderInitializeDone, - .DecoderDeinitializeDone = (void (*)(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id))&Pnacl_M41_PPB_ContentDecryptor_Private_DecoderDeinitializeDone, - .DecoderResetDone = (void (*)(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id))&Pnacl_M41_PPB_ContentDecryptor_Private_DecoderResetDone, - .DeliverFrame = (void (*)(PP_Instance instance, PP_Resource decrypted_frame, const struct PP_DecryptedFrameInfo* decrypted_frame_info))&Pnacl_M41_PPB_ContentDecryptor_Private_DeliverFrame, - .DeliverSamples = (void (*)(PP_Instance instance, PP_Resource audio_frames, const struct PP_DecryptedSampleInfo* decrypted_sample_info))&Pnacl_M41_PPB_ContentDecryptor_Private_DeliverSamples +static const struct PPB_ContentDecryptor_Private_0_14 Pnacl_Wrappers_PPB_ContentDecryptor_Private_0_14 = { + .PromiseResolved = (void (*)(PP_Instance instance, uint32_t promise_id))&Pnacl_M44_PPB_ContentDecryptor_Private_PromiseResolved, + .PromiseResolvedWithSession = (void (*)(PP_Instance instance, uint32_t promise_id, struct PP_Var session_id))&Pnacl_M44_PPB_ContentDecryptor_Private_PromiseResolvedWithSession, + .PromiseRejected = (void (*)(PP_Instance instance, uint32_t promise_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var error_description))&Pnacl_M44_PPB_ContentDecryptor_Private_PromiseRejected, + .SessionMessage = (void (*)(PP_Instance instance, struct PP_Var session_id, PP_CdmMessageType message_type, struct PP_Var message, struct PP_Var legacy_destination_url))&Pnacl_M44_PPB_ContentDecryptor_Private_SessionMessage, + .SessionKeysChange = (void (*)(PP_Instance instance, struct PP_Var session_id, PP_Bool has_additional_usable_key, uint32_t key_count, const struct PP_KeyInformation key_information[]))&Pnacl_M44_PPB_ContentDecryptor_Private_SessionKeysChange, + .SessionExpirationChange = (void (*)(PP_Instance instance, struct PP_Var session_id, PP_Time new_expiry_time))&Pnacl_M44_PPB_ContentDecryptor_Private_SessionExpirationChange, + .SessionClosed = (void (*)(PP_Instance instance, struct PP_Var session_id))&Pnacl_M44_PPB_ContentDecryptor_Private_SessionClosed, + .LegacySessionError = (void (*)(PP_Instance instance, struct PP_Var session_id, PP_CdmExceptionCode exception_code, uint32_t system_code, struct PP_Var error_description))&Pnacl_M44_PPB_ContentDecryptor_Private_LegacySessionError, + .DeliverBlock = (void (*)(PP_Instance instance, PP_Resource decrypted_block, const struct PP_DecryptedBlockInfo* decrypted_block_info))&Pnacl_M44_PPB_ContentDecryptor_Private_DeliverBlock, + .DecoderInitializeDone = (void (*)(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id, PP_Bool success))&Pnacl_M44_PPB_ContentDecryptor_Private_DecoderInitializeDone, + .DecoderDeinitializeDone = (void (*)(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id))&Pnacl_M44_PPB_ContentDecryptor_Private_DecoderDeinitializeDone, + .DecoderResetDone = (void (*)(PP_Instance instance, PP_DecryptorStreamType decoder_type, uint32_t request_id))&Pnacl_M44_PPB_ContentDecryptor_Private_DecoderResetDone, + .DeliverFrame = (void (*)(PP_Instance instance, PP_Resource decrypted_frame, const struct PP_DecryptedFrameInfo* decrypted_frame_info))&Pnacl_M44_PPB_ContentDecryptor_Private_DeliverFrame, + .DeliverSamples = (void (*)(PP_Instance instance, PP_Resource audio_frames, const struct PP_DecryptedSampleInfo* decrypted_sample_info))&Pnacl_M44_PPB_ContentDecryptor_Private_DeliverSamples }; static const struct PPB_DisplayColorProfile_Private_0_1 Pnacl_Wrappers_PPB_DisplayColorProfile_Private_0_1 = { @@ -6207,9 +6207,9 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_CameraDevice_Private_0_1 .real_iface = NULL }; -static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13 = { - .iface_macro = PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_13, - .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_ContentDecryptor_Private_0_13, +static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14 = { + .iface_macro = PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_14, + .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_ContentDecryptor_Private_0_14, .real_iface = NULL }; @@ -6523,7 +6523,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { &Pnacl_WrapperInfo_PPB_VideoCapture_Dev_0_3, &Pnacl_WrapperInfo_PPB_VideoDecoder_Dev_0_16, &Pnacl_WrapperInfo_PPB_CameraDevice_Private_0_1, - &Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_13, + &Pnacl_WrapperInfo_PPB_ContentDecryptor_Private_0_14, &Pnacl_WrapperInfo_PPB_DisplayColorProfile_Private_0_1, &Pnacl_WrapperInfo_PPB_Ext_CrxFileSystem_Private_0_1, &Pnacl_WrapperInfo_PPB_FileIO_Private_0_1, diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h index 03adaca..54a0d74 100644 --- a/ppapi/proxy/ppapi_messages.h +++ b/ppapi/proxy/ppapi_messages.h @@ -1165,7 +1165,7 @@ IPC_MESSAGE_ROUTED3(PpapiHostMsg_PPBInstance_SessionExpirationChange, IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBInstance_SessionClosed, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* session_id, String */) -IPC_MESSAGE_ROUTED5(PpapiHostMsg_PPBInstance_SessionError, +IPC_MESSAGE_ROUTED5(PpapiHostMsg_PPBInstance_LegacySessionError, PP_Instance /* instance */, ppapi::proxy::SerializedVar /* session_id, String */, PP_CdmExceptionCode /* exception_code */, diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc index a381c1d..6f0042d 100644 --- a/ppapi/proxy/ppb_instance_proxy.cc +++ b/ppapi/proxy/ppb_instance_proxy.cc @@ -193,8 +193,8 @@ bool PPB_Instance_Proxy::OnMessageReceived(const IPC::Message& msg) { OnHostMsgSessionExpirationChange) IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionClosed, OnHostMsgSessionClosed) - IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionError, - OnHostMsgSessionError) + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_LegacySessionError, + OnHostMsgLegacySessionError) IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DeliverBlock, OnHostMsgDeliverBlock) IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DecoderInitializeDone, @@ -650,12 +650,12 @@ void PPB_Instance_Proxy::SessionClosed(PP_Instance instance, SerializedVarSendInput(dispatcher(), session_id_var))); } -void PPB_Instance_Proxy::SessionError(PP_Instance instance, - PP_Var session_id_var, - PP_CdmExceptionCode exception_code, - uint32 system_code, - PP_Var error_description_var) { - dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionError( +void PPB_Instance_Proxy::LegacySessionError(PP_Instance instance, + PP_Var session_id_var, + PP_CdmExceptionCode exception_code, + uint32 system_code, + PP_Var error_description_var) { + dispatcher()->Send(new PpapiHostMsg_PPBInstance_LegacySessionError( API_ID_PPB_INSTANCE, instance, SerializedVarSendInput(dispatcher(), session_id_var), exception_code, system_code, @@ -1311,7 +1311,7 @@ void PPB_Instance_Proxy::OnHostMsgSessionClosed( } } -void PPB_Instance_Proxy::OnHostMsgSessionError( +void PPB_Instance_Proxy::OnHostMsgLegacySessionError( PP_Instance instance, SerializedVarReceiveInput session_id, PP_CdmExceptionCode exception_code, @@ -1321,9 +1321,9 @@ void PPB_Instance_Proxy::OnHostMsgSessionError( return; EnterInstanceNoLock enter(instance); if (enter.succeeded()) { - enter.functions()->SessionError(instance, session_id.Get(dispatcher()), - exception_code, system_code, - error_description.Get(dispatcher())); + enter.functions()->LegacySessionError( + instance, session_id.Get(dispatcher()), exception_code, system_code, + error_description.Get(dispatcher())); } } diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h index 1500ad6..f7a7159 100644 --- a/ppapi/proxy/ppb_instance_proxy.h +++ b/ppapi/proxy/ppb_instance_proxy.h @@ -140,11 +140,11 @@ class PPB_Instance_Proxy : public InterfaceProxy, PP_Var session_id_var, PP_Time new_expiry_time) override; void SessionClosed(PP_Instance instance, PP_Var session_id_var) override; - void SessionError(PP_Instance instance, - PP_Var session_id_var, - PP_CdmExceptionCode exception_code, - uint32 system_code, - PP_Var error_description_var) override; + void LegacySessionError(PP_Instance instance, + PP_Var session_id_var, + PP_CdmExceptionCode exception_code, + uint32 system_code, + PP_Var error_description_var) override; void DeliverBlock(PP_Instance instance, PP_Resource decrypted_block, const PP_DecryptedBlockInfo* block_info) override; @@ -273,7 +273,7 @@ class PPB_Instance_Proxy : public InterfaceProxy, PP_Time new_expiry_time); virtual void OnHostMsgSessionClosed(PP_Instance instance, SerializedVarReceiveInput session_id); - virtual void OnHostMsgSessionError( + virtual void OnHostMsgLegacySessionError( PP_Instance instance, SerializedVarReceiveInput session_id, PP_CdmExceptionCode exception_code, diff --git a/ppapi/thunk/interfaces_ppb_private.h b/ppapi/thunk/interfaces_ppb_private.h index 70c6c2e..9ac1b42 100644 --- a/ppapi/thunk/interfaces_ppb_private.h +++ b/ppapi/thunk/interfaces_ppb_private.h @@ -23,8 +23,8 @@ PROXIED_IFACE(PPB_BROKER_TRUSTED_INTERFACE_0_3, PPB_BrokerTrusted_0_3) PROXIED_IFACE(PPB_BROWSERFONT_TRUSTED_INTERFACE_1_0, PPB_BrowserFont_Trusted_1_0) -PROXIED_IFACE(PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_13, - PPB_ContentDecryptor_Private_0_13) +PROXIED_IFACE(PPB_CONTENTDECRYPTOR_PRIVATE_INTERFACE_0_14, + PPB_ContentDecryptor_Private_0_14) PROXIED_IFACE(PPB_CHARSET_TRUSTED_INTERFACE_1_0, PPB_CharSet_Trusted_1_0) PROXIED_IFACE(PPB_FILECHOOSER_TRUSTED_INTERFACE_0_5, diff --git a/ppapi/thunk/ppb_content_decryptor_private_thunk.cc b/ppapi/thunk/ppb_content_decryptor_private_thunk.cc index 1a52c05..abce20b 100644 --- a/ppapi/thunk/ppb_content_decryptor_private_thunk.cc +++ b/ppapi/thunk/ppb_content_decryptor_private_thunk.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// From private/ppb_content_decryptor_private.idl modified Mon Jan 12 17:33:29 +// From private/ppb_content_decryptor_private.idl modified Mon Mar 30 22:35:33 // 2015. #include "ppapi/c/pp_errors.h" @@ -94,17 +94,17 @@ void SessionClosed(PP_Instance instance, struct PP_Var session_id) { enter.functions()->SessionClosed(instance, session_id); } -void SessionError(PP_Instance instance, - struct PP_Var session_id, - PP_CdmExceptionCode exception_code, - uint32_t system_code, - struct PP_Var error_description) { - VLOG(4) << "PPB_ContentDecryptor_Private::SessionError()"; +void LegacySessionError(PP_Instance instance, + struct PP_Var session_id, + PP_CdmExceptionCode exception_code, + uint32_t system_code, + struct PP_Var error_description) { + VLOG(4) << "PPB_ContentDecryptor_Private::LegacySessionError()"; EnterInstance enter(instance); if (enter.failed()) return; - enter.functions()->SessionError(instance, session_id, exception_code, - system_code, error_description); + enter.functions()->LegacySessionError(instance, session_id, exception_code, + system_code, error_description); } void DeliverBlock(PP_Instance instance, @@ -174,15 +174,15 @@ void DeliverSamples( decrypted_sample_info); } -const PPB_ContentDecryptor_Private_0_13 - g_ppb_contentdecryptor_private_thunk_0_13 = {&PromiseResolved, +const PPB_ContentDecryptor_Private_0_14 + g_ppb_contentdecryptor_private_thunk_0_14 = {&PromiseResolved, &PromiseResolvedWithSession, &PromiseRejected, &SessionMessage, &SessionKeysChange, &SessionExpirationChange, &SessionClosed, - &SessionError, + &LegacySessionError, &DeliverBlock, &DecoderInitializeDone, &DecoderDeinitializeDone, @@ -192,9 +192,9 @@ const PPB_ContentDecryptor_Private_0_13 } // namespace -PPAPI_THUNK_EXPORT const PPB_ContentDecryptor_Private_0_13* -GetPPB_ContentDecryptor_Private_0_13_Thunk() { - return &g_ppb_contentdecryptor_private_thunk_0_13; +PPAPI_THUNK_EXPORT const PPB_ContentDecryptor_Private_0_14* +GetPPB_ContentDecryptor_Private_0_14_Thunk() { + return &g_ppb_contentdecryptor_private_thunk_0_14; } } // namespace thunk diff --git a/ppapi/thunk/ppb_instance_api.h b/ppapi/thunk/ppb_instance_api.h index 5c5813b..19888c1 100644 --- a/ppapi/thunk/ppb_instance_api.h +++ b/ppapi/thunk/ppb_instance_api.h @@ -180,11 +180,11 @@ class PPB_Instance_API { PP_Var session_id_var, PP_Time new_expiry_time) = 0; virtual void SessionClosed(PP_Instance instance, PP_Var session_id_var) = 0; - virtual void SessionError(PP_Instance instance, - PP_Var session_id_var, - PP_CdmExceptionCode exception_code, - uint32 system_code, - PP_Var error_description_var) = 0; + virtual void LegacySessionError(PP_Instance instance, + PP_Var session_id_var, + PP_CdmExceptionCode exception_code, + uint32 system_code, + PP_Var error_description_var) = 0; virtual void DeliverBlock(PP_Instance instance, PP_Resource decrypted_block, const PP_DecryptedBlockInfo* block_info) = 0; diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index cf9f850..d8eac65 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml @@ -57298,6 +57298,7 @@ To add a new entry, add it with any value and run test to compute valid value. <int value="1360443600" label="PPB_OpenGLES2FramebufferMultisample;1.0"/> <int value="1374404330" label="PPB_BrokerTrusted;0.3"/> <int value="1374976378" label="PPB_OpenGLES2Query;1.0"/> + <int value="1423820530" label="PPB_ContentDecryptor_Private;0.14"/> <int value="1437724812" label="PPB_AudioConfig;1.0"/> <int value="1443771913" label="PPB_NetAddress;1.0"/> <int value="1502481774" label="PPB_OpenGLES2ChromiumMapSub(Dev);1.0"/> |