Chromium Code Reviews| Index: content/renderer/media/webcontentdecryptionmodulesession_impl.cc |
| diff --git a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc |
| index 7cd33b4c60e21d15eaf6d8bb74690be86bbd1a96..5895a2987144bab993ea155dfddc4d86e50e2cdf 100644 |
| --- a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc |
| +++ b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc |
| @@ -30,7 +30,8 @@ class NewSessionCdmResultPromise : public CdmResultPromise<std::string> { |
| new_session_created_cb_(new_session_created_cb) {} |
| protected: |
| - virtual void OnResolve(const std::string& web_session_id) OVERRIDE { |
| + virtual void resolve(const std::string& web_session_id) OVERRIDE { |
| + CdmResultPromise<std::string>::resolve(web_session_id); |
| blink::WebContentDecryptionModuleResult::SessionStatus status = |
| new_session_created_cb_.Run(web_session_id); |
| web_cdm_result_.completeWithSession(status); |
|
xhwang
2014/10/03 07:34:21
Hmm, this is more confusing than I thought. Is thi
jrummell
2014/10/03 18:58:30
This won't be going away, even if we pass |web_ses
xhwang
2014/10/03 19:25:16
I see. This is a bit hacky. Imagine what if we hav
jrummell
2014/10/03 21:41:05
Moved to cdm_result_promise as a specialization.
|
| @@ -129,7 +130,8 @@ void WebContentDecryptionModuleSessionImpl::update( |
| web_session_id_, |
| response, |
| response_length, |
| - scoped_ptr<media::SimpleCdmPromise>(new SimpleCdmResultPromise(result))); |
| + scoped_ptr<media::SimpleCdmPromise>( |
| + new SimpleCdmResultPromise(result, std::string()))); |
| } |
| void WebContentDecryptionModuleSessionImpl::close( |
| @@ -137,7 +139,8 @@ void WebContentDecryptionModuleSessionImpl::close( |
| DCHECK(!web_session_id_.empty()); |
| adapter_->CloseSession( |
| web_session_id_, |
| - scoped_ptr<media::SimpleCdmPromise>(new SimpleCdmResultPromise(result))); |
| + scoped_ptr<media::SimpleCdmPromise>( |
| + new SimpleCdmResultPromise(result, std::string()))); |
| } |
| void WebContentDecryptionModuleSessionImpl::remove( |
| @@ -145,7 +148,8 @@ void WebContentDecryptionModuleSessionImpl::remove( |
| DCHECK(!web_session_id_.empty()); |
| adapter_->RemoveSession( |
| web_session_id_, |
| - scoped_ptr<media::SimpleCdmPromise>(new SimpleCdmResultPromise(result))); |
| + scoped_ptr<media::SimpleCdmPromise>( |
| + new SimpleCdmResultPromise(result, std::string()))); |
| } |
| void WebContentDecryptionModuleSessionImpl::getUsableKeyIds( |
| @@ -154,7 +158,7 @@ void WebContentDecryptionModuleSessionImpl::getUsableKeyIds( |
| adapter_->GetUsableKeyIds( |
| web_session_id_, |
| scoped_ptr<media::KeyIdsPromise>( |
| - new CdmResultPromise<media::KeyIdsVector>(result))); |
| + new CdmResultPromise<media::KeyIdsVector>(result, std::string()))); |
| } |
| void WebContentDecryptionModuleSessionImpl::release( |