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

Unified Diff: content/renderer/media/webcontentdecryptionmodulesession_impl.cc

Issue 380953002: Set callback interface on WebCDMSessionImpl after creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + change Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/webcontentdecryptionmodulesession_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webcontentdecryptionmodulesession_impl.cc
diff --git a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
index c16ca9cd68ff954a409ac01eaf67be477170333b..65975186a5f7185310f928fec0ef84dfc9331d61 100644
--- a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
+++ b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc
@@ -46,10 +46,8 @@ static blink::WebContentDecryptionModuleException ConvertException(
}
WebContentDecryptionModuleSessionImpl::WebContentDecryptionModuleSessionImpl(
- Client* client,
const scoped_refptr<CdmSessionAdapter>& adapter)
: adapter_(adapter),
- client_(client),
is_closed_(false),
next_available_result_index_(1),
weak_ptr_factory_(this) {
@@ -75,6 +73,10 @@ WebContentDecryptionModuleSessionImpl::
outstanding_results_.clear();
}
+void WebContentDecryptionModuleSessionImpl::setClientInterface(Client* client) {
+ client_ = client;
+}
+
blink::WebString WebContentDecryptionModuleSessionImpl::sessionId() const {
return blink::WebString::fromUTF8(web_session_id_);
}
@@ -209,6 +211,7 @@ void WebContentDecryptionModuleSessionImpl::release(
void WebContentDecryptionModuleSessionImpl::OnSessionMessage(
const std::vector<uint8>& message,
const GURL& destination_url) {
+ DCHECK(client_) << "Client not set before message event";
client_->message(
message.empty() ? NULL : &message[0], message.size(), destination_url);
}
« no previous file with comments | « content/renderer/media/webcontentdecryptionmodulesession_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698