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

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

Issue 960103002: Rename VideoCaptureImplManager to VideoCaptureService Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix some nits Created 5 years, 10 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
Index: content/renderer/media/video_capture_service.cc
diff --git a/content/renderer/media/video_capture_impl_manager.cc b/content/renderer/media/video_capture_service.cc
similarity index 88%
rename from content/renderer/media/video_capture_impl_manager.cc
rename to content/renderer/media/video_capture_service.cc
index 686e6ad74c1a0746d5aed659680b0a3ac1de4c46..db9629f4fe357ad635bdc7be5e8ba126b2db085c 100644
--- a/content/renderer/media/video_capture_impl_manager.cc
+++ b/content/renderer/media/video_capture_service.cc
@@ -6,7 +6,7 @@
//
// How is VideoCaptureImpl used:
//
-// VideoCaptureImpl is an IO thread object while VideoCaptureImplManager
+// VideoCaptureImpl is an IO thread object while VideoCaptureService
// lives only on the render thread. It is only possible to access an
// object of VideoCaptureImpl via a task on the IO thread.
//
@@ -22,7 +22,7 @@
// We make sure deletion is the last task on the IO thread for a
// VideoCaptureImpl object. This allows the use of Unretained() binding.
-#include "content/renderer/media/video_capture_impl_manager.h"
+#include "content/renderer/media/video_capture_service.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -33,13 +33,13 @@
namespace content {
-VideoCaptureImplManager::VideoCaptureImplManager()
+VideoCaptureService::VideoCaptureService()
: next_client_id_(0),
filter_(new VideoCaptureMessageFilter()),
weak_factory_(this) {
}
-VideoCaptureImplManager::~VideoCaptureImplManager() {
+VideoCaptureService::~VideoCaptureService() {
DCHECK(thread_checker_.CalledOnValidThread());
if (devices_.empty())
return;
@@ -59,7 +59,7 @@ VideoCaptureImplManager::~VideoCaptureImplManager() {
devices_.clear();
}
-base::Closure VideoCaptureImplManager::UseDevice(
+base::Closure VideoCaptureService::UseDevice(
media::VideoCaptureSessionId id) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -77,11 +77,11 @@ base::Closure VideoCaptureImplManager::UseDevice(
} else {
++it->second.first;
}
- return base::Bind(&VideoCaptureImplManager::UnrefDevice,
+ return base::Bind(&VideoCaptureService::UnrefDevice,
weak_factory_.GetWeakPtr(), id);
}
-base::Closure VideoCaptureImplManager::StartCapture(
+base::Closure VideoCaptureService::StartCapture(
media::VideoCaptureSessionId id,
const media::VideoCaptureParams& params,
const VideoCaptureStateUpdateCB& state_update_cb,
@@ -102,12 +102,12 @@ base::Closure VideoCaptureImplManager::StartCapture(
params,
state_update_cb,
deliver_frame_cb));
- return base::Bind(&VideoCaptureImplManager::StopCapture,
+ return base::Bind(&VideoCaptureService::StopCapture,
weak_factory_.GetWeakPtr(),
client_id, id);
}
-void VideoCaptureImplManager::GetDeviceSupportedFormats(
+void VideoCaptureService::GetDeviceSupportedFormats(
media::VideoCaptureSessionId id,
const VideoCaptureDeviceFormatsCB& callback) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -120,7 +120,7 @@ void VideoCaptureImplManager::GetDeviceSupportedFormats(
base::Unretained(impl), callback));
}
-void VideoCaptureImplManager::GetDeviceFormatsInUse(
+void VideoCaptureService::GetDeviceFormatsInUse(
media::VideoCaptureSessionId id,
const VideoCaptureDeviceFormatsCB& callback) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -134,13 +134,13 @@ void VideoCaptureImplManager::GetDeviceFormatsInUse(
}
VideoCaptureImpl*
-VideoCaptureImplManager::CreateVideoCaptureImplForTesting(
+VideoCaptureService::CreateVideoCaptureImplForTesting(
media::VideoCaptureSessionId id,
VideoCaptureMessageFilter* filter) const {
return NULL;
}
-void VideoCaptureImplManager::StopCapture(
+void VideoCaptureService::StopCapture(
int client_id, media::VideoCaptureSessionId id) {
DCHECK(thread_checker_.CalledOnValidThread());
VideoCaptureDeviceMap::iterator it = devices_.find(id);
@@ -152,7 +152,7 @@ void VideoCaptureImplManager::StopCapture(
base::Unretained(impl), client_id));
}
-void VideoCaptureImplManager::UnrefDevice(
+void VideoCaptureService::UnrefDevice(
media::VideoCaptureSessionId id) {
DCHECK(thread_checker_.CalledOnValidThread());
VideoCaptureDeviceMap::iterator it = devices_.find(id);
@@ -175,7 +175,7 @@ void VideoCaptureImplManager::UnrefDevice(
}
}
-void VideoCaptureImplManager::SuspendDevices(bool suspend) {
+void VideoCaptureService::SuspendDevices(bool suspend) {
DCHECK(thread_checker_.CalledOnValidThread());
for (VideoCaptureDeviceMap::iterator it = devices_.begin();
it != devices_.end(); ++it) {

Powered by Google App Engine
This is Rietveld 408576698