| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/media/video_capture_impl.h" | 5 #include "content/renderer/media/video_capture_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "content/common/child_process.h" | 9 #include "content/common/child_process.h" |
| 10 #include "content/common/media/video_capture_messages.h" | 10 #include "content/common/media/video_capture_messages.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 void VideoCaptureImpl::RemoveDelegateOnIOThread(base::Closure task) { | 424 void VideoCaptureImpl::RemoveDelegateOnIOThread(base::Closure task) { |
| 425 message_filter_->RemoveDelegate(this); | 425 message_filter_->RemoveDelegate(this); |
| 426 ml_proxy_->PostTask(FROM_HERE, task); | 426 ml_proxy_->PostTask(FROM_HERE, task); |
| 427 } | 427 } |
| 428 | 428 |
| 429 void VideoCaptureImpl::Send(IPC::Message* message) { | 429 void VideoCaptureImpl::Send(IPC::Message* message) { |
| 430 base::MessageLoopProxy* io_message_loop_proxy = | 430 base::MessageLoopProxy* io_message_loop_proxy = |
| 431 ChildProcess::current()->io_message_loop_proxy(); | 431 ChildProcess::current()->io_message_loop_proxy(); |
| 432 | 432 |
| 433 io_message_loop_proxy->PostTask(FROM_HERE, | 433 io_message_loop_proxy->PostTask(FROM_HERE, |
| 434 base::IgnoreReturn<bool>(base::Bind(&VideoCaptureMessageFilter::Send, | 434 base::Bind(base::IgnoreResult(&VideoCaptureMessageFilter::Send), |
| 435 message_filter_.get(), message))); | 435 message_filter_.get(), message)); |
| 436 } | 436 } |
| 437 | 437 |
| 438 bool VideoCaptureImpl::ClientHasDIB() { | 438 bool VideoCaptureImpl::ClientHasDIB() { |
| 439 CachedDIB::iterator it; | 439 CachedDIB::iterator it; |
| 440 for (it = cached_dibs_.begin(); it != cached_dibs_.end(); it++) { | 440 for (it = cached_dibs_.begin(); it != cached_dibs_.end(); it++) { |
| 441 if (it->second->references > 0) | 441 if (it->second->references > 0) |
| 442 return true; | 442 return true; |
| 443 } | 443 } |
| 444 return false; | 444 return false; |
| 445 } | 445 } |
| OLD | NEW |