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

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

Issue 2824193002: Enable use_once_callback for //content/common/*.mojom (Closed)
Patch Set: rebase Created 3 years, 8 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/browser/renderer_host/media/video_capture_host.cc
diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc
index 8da0fd61d2c58c95e206e0b71e5fbd62ec0f661a..a51f00e5628c019a7a8419cd37a8d0562ef3ff88 100644
--- a/content/browser/renderer_host/media/video_capture_host.cc
+++ b/content/browser/renderer_host/media/video_capture_host.cc
@@ -234,7 +234,7 @@ void VideoCaptureHost::ReleaseBuffer(int32_t device_id,
void VideoCaptureHost::GetDeviceSupportedFormats(
int32_t device_id,
int32_t session_id,
- const GetDeviceSupportedFormatsCallback& callback) {
+ GetDeviceSupportedFormatsCallback callback) {
DVLOG(1) << __func__ << " " << device_id;
DCHECK_CURRENTLY_ON(BrowserThread::IO);
media::VideoCaptureFormats supported_formats;
@@ -242,13 +242,13 @@ void VideoCaptureHost::GetDeviceSupportedFormats(
->GetDeviceSupportedFormats(session_id, &supported_formats)) {
DLOG(WARNING) << "Could not retrieve device supported formats";
}
- callback.Run(supported_formats);
+ std::move(callback).Run(supported_formats);
}
void VideoCaptureHost::GetDeviceFormatsInUse(
int32_t device_id,
int32_t session_id,
- const GetDeviceFormatsInUseCallback& callback) {
+ GetDeviceFormatsInUseCallback callback) {
DVLOG(1) << __func__ << " " << device_id;
DCHECK_CURRENTLY_ON(BrowserThread::IO);
media::VideoCaptureFormats formats_in_use;
@@ -256,7 +256,7 @@ void VideoCaptureHost::GetDeviceFormatsInUse(
session_id, &formats_in_use)) {
DLOG(WARNING) << "Could not retrieve device format(s) in use";
}
- callback.Run(formats_in_use);
+ std::move(callback).Run(formats_in_use);
}
void VideoCaptureHost::DoError(VideoCaptureControllerID controller_id) {
« no previous file with comments | « content/browser/renderer_host/media/video_capture_host.h ('k') | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698