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

Unified Diff: chromecast/browser/media/cma_message_filter_host.cc

Issue 1407933010: media: Make MediaKeys ref-counted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address timav@'s comments. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/browser/media/cma_message_filter_host.cc
diff --git a/chromecast/browser/media/cma_message_filter_host.cc b/chromecast/browser/media/cma_message_filter_host.cc
index 0a531e71f81766293b68b45319db0ccb67f1c33e..6de55adea481a776daabdaa04c6950333c3d313c 100644
--- a/chromecast/browser/media/cma_message_filter_host.cc
+++ b/chromecast/browser/media/cma_message_filter_host.cc
@@ -108,7 +108,7 @@ void SetCdmOnUiThread(
return;
}
- ::media::BrowserCdm* cdm = host->GetBrowserCdm(render_frame_id, cdm_id);
+ scoped_refptr<::media::MediaKeys> cdm = host->GetCdm(render_frame_id, cdm_id);
if (!cdm) {
LOG(WARNING) << "Could not find BrowserCdm (" << render_frame_id << ","
<< cdm_id << ")";
@@ -116,13 +116,10 @@ void SetCdmOnUiThread(
}
BrowserCdmCast* browser_cdm_cast =
- static_cast<BrowserCdmCastUi*>(cdm)->browser_cdm_cast();
+ static_cast<BrowserCdmCastUi*>(cdm.get())->browser_cdm_cast();
MediaMessageLoop::GetTaskRunner()->PostTask(
- FROM_HERE,
- base::Bind(&SetCdmOnCmaThread,
- render_process_id,
- media_id,
- browser_cdm_cast));
+ FROM_HERE, base::Bind(&SetCdmOnCmaThread, render_process_id, media_id,
+ base::Unretained(browser_cdm_cast)));
gunsch 2015/10/29 16:01:29 TODO(halliwell) to fix this and pass the scoped_re
halliwell 2015/10/30 01:50:51 I filed internal b/25378705 for this.
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698