OLD | NEW |
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 #ifndef PhotoCapabilities_h | 5 #ifndef PhotoCapabilities_h |
6 #define PhotoCapabilities_h | 6 #define PhotoCapabilities_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "media/capture/mojo/image_capture.mojom-blink.h" | 9 #include "media/capture/mojo/image_capture.mojom-blink.h" |
10 #include "modules/imagecapture/MediaSettingsRange.h" | 10 #include "modules/imagecapture/MediaSettingsRange.h" |
| 11 #include "wtf/Vector.h" |
11 #include "wtf/text/WTFString.h" | 12 #include "wtf/text/WTFString.h" |
12 | 13 |
13 namespace blink { | 14 namespace blink { |
14 | 15 |
15 class PhotoCapabilities final | 16 class PhotoCapabilities final |
16 : public GarbageCollectedFinalized<PhotoCapabilities>, | 17 : public GarbageCollectedFinalized<PhotoCapabilities>, |
17 public ScriptWrappable { | 18 public ScriptWrappable { |
18 DEFINE_WRAPPERTYPEINFO(); | 19 DEFINE_WRAPPERTYPEINFO(); |
19 | 20 |
20 public: | 21 public: |
21 static PhotoCapabilities* create(); | 22 static PhotoCapabilities* create(); |
22 virtual ~PhotoCapabilities() = default; | 23 virtual ~PhotoCapabilities() = default; |
23 | 24 |
24 MediaSettingsRange* imageHeight() const { return m_imageHeight; } | 25 MediaSettingsRange* imageHeight() const { return m_imageHeight; } |
25 void setImageHeight(MediaSettingsRange* value) { m_imageHeight = value; } | 26 void setImageHeight(MediaSettingsRange* value) { m_imageHeight = value; } |
26 | 27 |
27 MediaSettingsRange* imageWidth() const { return m_imageWidth; } | 28 MediaSettingsRange* imageWidth() const { return m_imageWidth; } |
28 void setImageWidth(MediaSettingsRange* value) { m_imageWidth = value; } | 29 void setImageWidth(MediaSettingsRange* value) { m_imageWidth = value; } |
29 | 30 |
30 String fillLightMode() const; | 31 Vector<String> fillLightMode() const; |
31 void setFillLightMode(media::mojom::blink::FillLightMode fillLightMode) { | 32 void setFillLightMode(Vector<media::mojom::blink::FillLightMode> modes) { |
32 m_fillLightMode = fillLightMode; | 33 m_fillLightModes = modes; |
33 } | 34 } |
34 | 35 |
35 bool redEyeReduction() const { return m_redEyeReduction; } | 36 String redEyeReduction() const; |
36 void setRedEyeReduction(bool redEyeReduction) { | 37 void setRedEyeReduction(bool redEyeReduction) { |
37 m_redEyeReduction = redEyeReduction; | 38 m_redEyeReduction = redEyeReduction; |
38 } | 39 } |
39 | 40 |
40 DECLARE_VIRTUAL_TRACE(); | 41 DECLARE_VIRTUAL_TRACE(); |
41 | 42 |
42 private: | 43 private: |
43 PhotoCapabilities() = default; | 44 PhotoCapabilities() = default; |
44 | 45 |
45 Member<MediaSettingsRange> m_imageHeight; | 46 Member<MediaSettingsRange> m_imageHeight; |
46 Member<MediaSettingsRange> m_imageWidth; | 47 Member<MediaSettingsRange> m_imageWidth; |
47 media::mojom::blink::FillLightMode m_fillLightMode = | 48 Vector<media::mojom::blink::FillLightMode> m_fillLightModes; |
48 media::mojom::blink::FillLightMode::NONE; | |
49 bool m_redEyeReduction; | 49 bool m_redEyeReduction; |
50 }; | 50 }; |
51 | 51 |
52 } // namespace blink | 52 } // namespace blink |
53 | 53 |
54 #endif // PhotoCapabilities_h | 54 #endif // PhotoCapabilities_h |
OLD | NEW |