Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: content/common/android/resource_request_body_android.h

Issue 2038233002: Using ResourceRequestBody as the type of HTTP body outside of //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make-resource-request-body-public
Patch Set: Rebasing... Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/android/resource_request_body_android.h
diff --git a/content/common/android/resource_request_body_android.h b/content/common/android/resource_request_body_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..70373ebff2afcbee3f1484e449200d6e0c067a1f
--- /dev/null
+++ b/content/common/android/resource_request_body_android.h
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_ANDROID_RESOURCE_REQUEST_BODY_JNI_H_
+#define CONTENT_BROWSER_ANDROID_RESOURCE_REQUEST_BODY_JNI_H_
+
+#include <jni.h>
+
+#include "base/android/scoped_java_ref.h"
+#include "base/memory/ref_counted.h"
+
+namespace content {
+
+class ResourceRequestBodyImpl;
+
+bool RegisterResourceRequestBody(JNIEnv* env);
+
+// Returns an instance of org.chromium.content_public.common.ResourceRequestBody
+// that contains serialized representation of the |native_object|.
+base::android::ScopedJavaLocalRef<jobject>
+ConvertResourceRequestBodyToJavaObject(
+ JNIEnv* env,
+ const scoped_refptr<ResourceRequestBodyImpl>& native_object);
+
+// Reconstructs the native C++ content::ResourceRequestBody object based on
+// org.chromium.content_public.common.ResourceRequestBody (|java_object|) passed
+// in as an argument.
+scoped_refptr<ResourceRequestBodyImpl> ExtractResourceRequestBodyFromJavaObject(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& java_object);
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_RESOURCE_REQUEST_BODY_JNI_H_
« no previous file with comments | « content/common/android/common_jni_registrar.cc ('k') | content/common/android/resource_request_body_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698