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

Unified Diff: content/renderer/pepper/pepper_platform_video_capture.cc

Issue 120893002: Eliminate video capture thread in renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload again Created 6 years, 11 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/pepper/pepper_platform_video_capture.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_platform_video_capture.cc
diff --git a/content/renderer/pepper/pepper_platform_video_capture.cc b/content/renderer/pepper/pepper_platform_video_capture.cc
index dc58ad44e68570aecd07095c60b3f1043b90c601..673fb72eca1e2f670d68604e3c14ae904ecc5be0 100644
--- a/content/renderer/pepper/pepper_platform_video_capture.cc
+++ b/content/renderer/pepper/pepper_platform_video_capture.cc
@@ -28,7 +28,6 @@ PepperPlatformVideoCapture::PepperPlatformVideoCapture(
handler_proxy_(new media::VideoCaptureHandlerProxy(
this, base::MessageLoopProxy::current())),
handler_(handler),
- video_capture_(NULL),
unbalanced_start_(false),
pending_open_device_(false),
pending_open_device_id_(-1) {
@@ -83,12 +82,7 @@ void PepperPlatformVideoCapture::DetachEventHandler() {
handler_ = NULL;
StopCapture(NULL);
- if (video_capture_) {
- VideoCaptureImplManager* manager =
- RenderThreadImpl::current()->video_capture_impl_manager();
- manager->RemoveDevice(session_id_, handler_proxy_.get());
- video_capture_ = NULL;
- }
+ video_capture_.reset();
if (render_view_.get()) {
if (!label_.empty()) {
@@ -147,7 +141,7 @@ PepperPlatformVideoCapture::~PepperPlatformVideoCapture() {
void PepperPlatformVideoCapture::Initialize() {
VideoCaptureImplManager* manager =
RenderThreadImpl::current()->video_capture_impl_manager();
- video_capture_ = manager->AddDevice(session_id_, handler_proxy_.get());
+ video_capture_ = manager->UseDevice(session_id_);
}
void PepperPlatformVideoCapture::OnDeviceOpened(int request_id,
« no previous file with comments | « content/renderer/pepper/pepper_platform_video_capture.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698