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 #include "media/capture/video/android/photo_capabilities.h" | 5 #include "media/capture/video/android/photo_capabilities.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_array.h" | 8 #include "base/android/jni_array.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "jni/PhotoCapabilities_jni.h" | 10 #include "jni/PhotoCapabilities_jni.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 base::android::ScopedJavaLocalRef<jintArray> jni_modes = | 159 base::android::ScopedJavaLocalRef<jintArray> jni_modes = |
160 Java_PhotoCapabilities_getFillLightModes(env, object_); | 160 Java_PhotoCapabilities_getFillLightModes(env, object_); |
161 if (jni_modes.obj()) { | 161 if (jni_modes.obj()) { |
162 base::android::JavaIntArrayToIntVector( | 162 base::android::JavaIntArrayToIntVector( |
163 env, jni_modes.obj(), reinterpret_cast<std::vector<int>*>(&modes)); | 163 env, jni_modes.obj(), reinterpret_cast<std::vector<int>*>(&modes)); |
164 } | 164 } |
165 return modes; | 165 return modes; |
166 } | 166 } |
167 | 167 |
| 168 bool PhotoCapabilities::getSupportsTorch() const { |
| 169 DCHECK(!object_.is_null()); |
| 170 return Java_PhotoCapabilities_getSupportsTorch(AttachCurrentThread(), |
| 171 object_); |
| 172 } |
| 173 |
168 bool PhotoCapabilities::getTorch() const { | 174 bool PhotoCapabilities::getTorch() const { |
169 DCHECK(!object_.is_null()); | 175 DCHECK(!object_.is_null()); |
170 return Java_PhotoCapabilities_getTorch(AttachCurrentThread(), object_); | 176 return Java_PhotoCapabilities_getTorch(AttachCurrentThread(), object_); |
171 } | 177 } |
172 | 178 |
173 bool PhotoCapabilities::getRedEyeReduction() const { | 179 bool PhotoCapabilities::getRedEyeReduction() const { |
174 DCHECK(!object_.is_null()); | 180 DCHECK(!object_.is_null()); |
175 return Java_PhotoCapabilities_getRedEyeReduction(AttachCurrentThread(), | 181 return Java_PhotoCapabilities_getRedEyeReduction(AttachCurrentThread(), |
176 object_); | 182 object_); |
177 } | 183 } |
(...skipping 16 matching lines...) Expand all Loading... |
194 AttachCurrentThread(), object_); | 200 AttachCurrentThread(), object_); |
195 } | 201 } |
196 | 202 |
197 int PhotoCapabilities::getStepColorTemperature() const { | 203 int PhotoCapabilities::getStepColorTemperature() const { |
198 DCHECK(!object_.is_null()); | 204 DCHECK(!object_.is_null()); |
199 return Java_PhotoCapabilities_getStepColorTemperature(AttachCurrentThread(), | 205 return Java_PhotoCapabilities_getStepColorTemperature(AttachCurrentThread(), |
200 object_); | 206 object_); |
201 } | 207 } |
202 | 208 |
203 } // namespace media | 209 } // namespace media |
OLD | NEW |