Index: chromecast/renderer/cast_render_process_observer.cc |
diff --git a/chromecast/renderer/cast_render_process_observer.cc b/chromecast/renderer/cast_render_process_observer.cc |
index 316fd616f74ca6b161a3b94c26d97d3139156c7c..caba2442a0cbf04a3a5704af711609ad9f13a45a 100644 |
--- a/chromecast/renderer/cast_render_process_observer.cc |
+++ b/chromecast/renderer/cast_render_process_observer.cc |
@@ -4,6 +4,7 @@ |
#include "chromecast/renderer/cast_render_process_observer.h" |
+#include "chromecast/renderer/media/capabilities_message_filter.h" |
#include "chromecast/renderer/media/cma_message_filter_proxy.h" |
#include "content/public/renderer/render_thread.h" |
@@ -31,6 +32,8 @@ void CastRenderProcessObserver::CreateCustomFilters() { |
new media::CmaMessageFilterProxy(thread->GetIOMessageLoopProxy()); |
thread->AddFilter(cma_message_filter_proxy_.get()); |
#endif // !defined(OS_ANDROID) |
+ capabilities_message_filter_ = new CapabilitiesMessageFilter; |
+ thread->AddFilter(capabilities_message_filter_.get()); |
for (const auto& filter : platform_message_filters_) { |
thread->AddFilter(filter.get()); |
} |
@@ -41,9 +44,13 @@ void CastRenderProcessObserver::OnRenderProcessShutdown() { |
#if !defined(OS_ANDROID) |
if (cma_message_filter_proxy_.get()) { |
thread->RemoveFilter(cma_message_filter_proxy_.get()); |
- cma_message_filter_proxy_ = NULL; |
+ cma_message_filter_proxy_ = nullptr; |
} |
#endif // !defined(OS_ANDROID) |
+ if (capabilities_message_filter_.get()) { |
+ thread->RemoveFilter(capabilities_message_filter_.get()); |
+ capabilities_message_filter_ = nullptr; |
+ } |
for (auto& filter : platform_message_filters_) { |
if (filter.get()) { |
thread->RemoveFilter(filter.get()); |