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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1225083002: media: Add BrowserCdmManagerProcessWatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 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/browser/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 248ed1d8b17158adeb873798ca038fb954fa0f68..11345569f936af7cb0af1217d413fd3a5bc759b7 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -848,8 +848,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(browser_demuxer_android_.get());
#endif
#if defined(ENABLE_BROWSER_CDMS)
- browser_cdm_manager_ = new BrowserCdmManager(GetID(), NULL);
- AddFilter(browser_cdm_manager_.get());
+ AddFilter(new BrowserCdmManager(GetID(), NULL));
#endif
WebSocketDispatcherHost::GetRequestContextCallback
@@ -1024,7 +1023,10 @@ void RenderProcessHostImpl::SendUpdateValueState(unsigned int target,
media::BrowserCdm* RenderProcessHostImpl::GetBrowserCdm(int render_frame_id,
int cdm_id) const {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- return browser_cdm_manager_->GetCdm(render_frame_id, cdm_id);
+ BrowserCdmManager* manager = BrowserCdmManager::FromProcess(GetID());
+ if (!manager)
+ return nullptr;
+ return manager->GetCdm(render_frame_id, cdm_id);
}
#endif
@@ -1686,9 +1688,6 @@ void RenderProcessHostImpl::Cleanup() {
// The following members should be cleared in ProcessDied() as well!
gpu_message_filter_ = NULL;
message_port_message_filter_ = NULL;
-#if defined(ENABLE_BROWSER_CDMS)
- browser_cdm_manager_ = NULL;
-#endif
RemoveUserData(kSessionStorageHolderKey);
@@ -2129,9 +2128,6 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead,
gpu_message_filter_ = NULL;
message_port_message_filter_ = NULL;
-#if defined(ENABLE_BROWSER_CDMS)
- browser_cdm_manager_ = NULL;
-#endif
RemoveUserData(kSessionStorageHolderKey);
IDMap<IPC::Listener>::iterator iter(&listeners_);
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698