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

Unified Diff: content/browser/renderer_host/media/video_capture_host.h

Issue 2430313007: VideoCapture: remove last remnants of IPC (Closed)
Patch Set: rockot@ comment on using ChildThread Created 4 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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_host.h
diff --git a/content/browser/renderer_host/media/video_capture_host.h b/content/browser/renderer_host/media/video_capture_host.h
index 546bf654fb6e35f09945d89d0fad35a83d588d1c..25699b9078cb5656a8f0e635cd1a72c917380374 100644
--- a/content/browser/renderer_host/media/video_capture_host.h
+++ b/content/browser/renderer_host/media/video_capture_host.h
@@ -15,9 +15,6 @@
#include "content/browser/renderer_host/media/video_capture_controller_event_handler.h"
#include "content/common/content_export.h"
#include "content/common/video_capture.mojom.h"
-#include "content/public/browser/browser_associated_interface.h"
-#include "content/public/browser/browser_message_filter.h"
-#include "ipc/ipc_message.h"
namespace content {
class MediaStreamManager;
@@ -27,28 +24,19 @@ class MediaStreamManager;
// stream) and a VideoCaptureController in the browser process (which provides
// the stream from a video device). Every remote client is identified via a
// unique |device_id|, and is paired with a single VideoCaptureController.
-//
-// This class is owned by RenderProcessHostImpl, and instantiated on UI thread,
-// but all other operations and method calls happen on IO thread.
class CONTENT_EXPORT VideoCaptureHost
- : public BrowserMessageFilter,
- public VideoCaptureControllerEventHandler,
- public BrowserAssociatedInterface<mojom::VideoCaptureHost>,
+ : public VideoCaptureControllerEventHandler,
public mojom::VideoCaptureHost {
public:
explicit VideoCaptureHost(MediaStreamManager* media_stream_manager);
- private:
- friend class BrowserThread;
- friend class base::DeleteHelper<VideoCaptureHost>;
- friend class VideoCaptureHostTest;
+ static void Create(MediaStreamManager* media_stream_manager,
+ mojom::VideoCaptureHostRequest request);
~VideoCaptureHost() override;
- // BrowserMessageFilter implementation.
- void OnChannelClosing() override;
- void OnDestruct() const override;
- bool OnMessageReceived(const IPC::Message& message) override;
+ private:
+ friend class VideoCaptureHostTest;
// VideoCaptureControllerEventHandler implementation.
void OnError(VideoCaptureControllerID id) override;
@@ -113,6 +101,8 @@ class CONTENT_EXPORT VideoCaptureHost
// Start() and the corresponding Stop().
std::map<int32_t, mojom::VideoCaptureObserverPtr> device_id_to_observer_map_;
+ base::WeakPtrFactory<VideoCaptureHost> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost);
};
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698