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

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

Issue 7058055: create one video capture message filter per renderer process (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: from code review Created 9 years, 6 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/video_capture_impl.cc ('k') | content/renderer/media/video_capture_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_capture_impl_manager.cc
===================================================================
--- content/renderer/media/video_capture_impl_manager.cc (revision 88354)
+++ content/renderer/media/video_capture_impl_manager.cc (working copy)
@@ -5,44 +5,9 @@
#include "content/renderer/media/video_capture_impl_manager.h"
#include "base/memory/singleton.h"
-#include "content/common/child_process.h"
-#include "content/common/child_thread.h"
-#include "content/common/video_capture_messages.h"
-#include "content/common/view_messages.h"
+#include "content/renderer/video_capture_message_filter_creator.h"
#include "media/base/message_loop_factory_impl.h"
-namespace {
-
-// VideoCaptureMessageFilterCreator is to be used as a singleton so we can get
-// access to a shared VideoCaptureMessageFilter.
-// Example usage:
-// VideoCaptureMessageFilter* filter =
-// VideoCaptureMessageFilterCreator::SharedFilter();
-
-class VideoCaptureMessageFilterCreator {
- public:
- VideoCaptureMessageFilterCreator() {
- int routing_id;
- ChildThread::current()->Send(
- new ViewHostMsg_GenerateRoutingID(&routing_id));
- filter_ = new VideoCaptureMessageFilter(routing_id);
- filter_->AddFilter();
- }
-
- static VideoCaptureMessageFilter* SharedFilter() {
- return GetInstance()->filter_.get();
- }
-
- static VideoCaptureMessageFilterCreator* GetInstance() {
- return Singleton<VideoCaptureMessageFilterCreator>::get();
- }
-
- private:
- scoped_refptr<VideoCaptureMessageFilter> filter_;
-};
-
-} // namespace
-
VideoCaptureImplManager::VideoCaptureImplManager() {
ml_factory_.reset(new media::MessageLoopFactoryImpl());
ml_proxy_ = ml_factory_->GetMessageLoopProxy("VC manager");
« no previous file with comments | « content/renderer/media/video_capture_impl.cc ('k') | content/renderer/media/video_capture_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698