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

Side by Side Diff: third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.cpp

Issue 2787933002: ImageCapture: separate fillLightMode, redEyeReduction and Torch (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "modules/imagecapture/PhotoCapabilities.h" 5 #include "modules/imagecapture/PhotoCapabilities.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 // static 9 // static
10 PhotoCapabilities* PhotoCapabilities::create() { 10 PhotoCapabilities* PhotoCapabilities::create() {
(...skipping 14 matching lines...) Expand all
25 fillLightModes.push_back("flash"); 25 fillLightModes.push_back("flash");
26 break; 26 break;
27 default: 27 default:
28 NOTREACHED(); 28 NOTREACHED();
29 } 29 }
30 } 30 }
31 return fillLightModes; 31 return fillLightModes;
32 } 32 }
33 33
34 String PhotoCapabilities::redEyeReduction() const { 34 String PhotoCapabilities::redEyeReduction() const {
35 return m_redEyeReduction ? "controllable" : "never"; 35 switch (m_redEyeReduction) {
36 case media::mojom::blink::RedEyeReduction::NEVER:
37 return "never";
38 case media::mojom::blink::RedEyeReduction::ALWAYS:
39 return "always";
40 case media::mojom::blink::RedEyeReduction::CONTROLLABLE:
41 return "controllable";
42 default:
43 NOTREACHED();
44 }
45 return "";
36 } 46 }
37 47
38 DEFINE_TRACE(PhotoCapabilities) { 48 DEFINE_TRACE(PhotoCapabilities) {
39 visitor->trace(m_imageHeight); 49 visitor->trace(m_imageHeight);
40 visitor->trace(m_imageWidth); 50 visitor->trace(m_imageWidth);
41 } 51 }
42 52
43 } // namespace blink 53 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698