| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "media/capture/video/android/photo_capabilities.h" | |
| 6 | |
| 7 #include "base/android/jni_android.h" | |
| 8 #include "base/android/jni_array.h" | |
| 9 #include "base/android/jni_string.h" | |
| 10 #include "jni/PhotoCapabilities_jni.h" | |
| 11 | |
| 12 using base::android::AttachCurrentThread; | |
| 13 | |
| 14 namespace media { | |
| 15 | |
| 16 PhotoCapabilities::PhotoCapabilities( | |
| 17 base::android::ScopedJavaLocalRef<jobject> object) | |
| 18 : object_(object) {} | |
| 19 | |
| 20 PhotoCapabilities::~PhotoCapabilities() {} | |
| 21 | |
| 22 // static | |
| 23 bool PhotoCapabilities::RegisterPhotoCapabilities(JNIEnv* env) { | |
| 24 return RegisterNativesImpl(env); | |
| 25 } | |
| 26 | |
| 27 int PhotoCapabilities::getMinZoom() const { | |
| 28 DCHECK(!object_.is_null()); | |
| 29 return Java_PhotoCapabilities_getMinZoom(AttachCurrentThread(), | |
| 30 object_.obj()); | |
| 31 } | |
| 32 | |
| 33 int PhotoCapabilities::getMaxZoom() const { | |
| 34 DCHECK(!object_.is_null()); | |
| 35 return Java_PhotoCapabilities_getMaxZoom(AttachCurrentThread(), | |
| 36 object_.obj()); | |
| 37 } | |
| 38 | |
| 39 int PhotoCapabilities::getCurrentZoom() const { | |
| 40 DCHECK(!object_.is_null()); | |
| 41 return Java_PhotoCapabilities_getCurrentZoom(AttachCurrentThread(), | |
| 42 object_.obj()); | |
| 43 } | |
| 44 | |
| 45 } // namespace media | |
| OLD | NEW |