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

Unified Diff: third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp

Issue 2842103002: Image Capture: two small nits (Closed)
Patch Set: reworded comment on supported exposure modes 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
« no previous file with comments | « media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
diff --git a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
index 083e5955c86a1d71a6d73569ee885e239cba9431..0baaac087411a79d39cbfeef862ae44866565bce 100644
--- a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
+++ b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
@@ -403,7 +403,7 @@ void ImageCapture::ClearMediaTrackConstraints(ScriptPromiseResolver* resolver) {
}
void ImageCapture::GetMediaTrackSettings(MediaTrackSettings& settings) const {
- // Merge any present |m_settings| members into |settings|.
+ // Merge any present |settings_| members into |settings|.
if (settings_.hasWhiteBalanceMode())
settings.setWhiteBalanceMode(settings_.whiteBalanceMode());
@@ -412,8 +412,10 @@ void ImageCapture::GetMediaTrackSettings(MediaTrackSettings& settings) const {
if (settings_.hasFocusMode())
settings.setFocusMode(settings_.focusMode());
- if (settings_.hasPointsOfInterest())
+ if (settings_.hasPointsOfInterest() &&
+ !settings_.pointsOfInterest().IsEmpty()) {
settings.setPointsOfInterest(settings_.pointsOfInterest());
+ }
if (settings_.hasExposureCompensation())
settings.setExposureCompensation(settings_.exposureCompensation());
@@ -504,7 +506,9 @@ void ImageCapture::OnPhotoCapabilities(
caps->SetImageWidth(
MediaSettingsRange::Create(std::move(capabilities->width)));
}
- caps->SetFillLightMode(capabilities->fill_light_mode);
+
+ if (!capabilities->fill_light_mode.IsEmpty())
+ caps->SetFillLightMode(capabilities->fill_light_mode);
resolver->Resolve(caps);
}
« no previous file with comments | « media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698