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 |
| 13 namespace content { |
| 14 |
| 15 class ResourceRequestBodyImpl; |
| 16 |
| 17 bool RegisterResourceRequestBody(JNIEnv* env); |
| 18 |
| 19 // Returns an instance of org.chromium.content_public.common.ResourceRequestBody |
| 20 // that contains serialized representation of the |native_object|. |
| 21 base::android::ScopedJavaLocalRef<jobject> |
| 22 ConvertResourceRequestBodyToJavaObject( |
| 23 JNIEnv* env, |
| 24 const scoped_refptr<ResourceRequestBodyImpl>& native_object); |
| 25 |
| 26 // Reconstructs the native C++ content::ResourceRequestBody object based on |
| 27 // org.chromium.content_public.common.ResourceRequestBody (|java_object|) passed |
| 28 // in as an argument. |
| 29 scoped_refptr<ResourceRequestBodyImpl> ExtractResourceRequestBodyFromJavaObject( |
| 30 JNIEnv* env, |
| 31 const base::android::JavaParamRef<jobject>& java_object); |
| 32 |
| 33 } // namespace content |
| 34 |
| 35 #endif // CONTENT_BROWSER_ANDROID_RESOURCE_REQUEST_BODY_JNI_H_ |
OLD | NEW |