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 #ifndef CONTENT_BROWSER_ANDROID_RESOURCE_REQUEST_BODY_JNI_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_RESOURCE_REQUEST_BODY_JNI_H_ |
| 7 |
| 8 #include <jni.h> |
| 9 |
| 10 #include "base/android/scoped_java_ref.h" |
| 11 #include "base/memory/ref_counted.h" |
| 12 #include "content/common/content_export.h" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 class ResourceRequestBody; |
| 17 |
| 18 bool RegisterResourceRequestBody(JNIEnv* env); |
| 19 |
| 20 // Returns org.chromium.content_public.common.ResourceRequestBody that |
| 21 // wraps a ref-counted pointer to the |resource_request_body|. |
| 22 CONTENT_EXPORT base::android::ScopedJavaLocalRef<jobject> |
| 23 ConvertResourceRequestBodyToJavaObject( |
| 24 JNIEnv* env, |
| 25 const scoped_refptr<ResourceRequestBody>& native_object); |
| 26 |
| 27 // Extracts and returns a C++ object out of |
| 28 // org.chromium.content_public.common.ResourceRequestBody. |
| 29 CONTENT_EXPORT scoped_refptr<ResourceRequestBody> |
| 30 ExtractResourceRequestBodyFromJavaObject( |
| 31 JNIEnv* env, |
| 32 const base::android::JavaParamRef<jobject>& java_object); |
| 33 |
| 34 } // namespace content |
| 35 |
| 36 #endif // CONTENT_BROWSER_ANDROID_RESOURCE_REQUEST_BODY_JNI_H_ |
OLD | NEW |