Index: android_webview/native/intercepted_request_data.h |
diff --git a/android_webview/native/intercepted_request_data.h b/android_webview/native/intercepted_request_data.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e528b3ecd2847c93e0786a3450e9e1189779fa97 |
--- /dev/null |
+++ b/android_webview/native/intercepted_request_data.h |
@@ -0,0 +1,31 @@ |
+// Copyright (c) 2012 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_INTERCEPTED_REQUEST_DATA_H_ |
+#define CONTENT_BROWSER_ANDROID_INTERCEPTED_REQUEST_DATA_H_ |
+ |
+#include <string> |
+ |
+#include "base/android/scoped_java_ref.h" |
+#include "base/memory/ref_counted.h" |
+ |
+class InterceptedRequestData { |
+ public: |
+ InterceptedRequestData(JNIEnv* env, |
+ base::android::JavaRef<jobject> obj); |
+ ~InterceptedRequestData(); |
+ |
+ base::android::ScopedJavaLocalRef<jobject> GetInputStream(JNIEnv* env) const; |
+ bool GetMimeType(JNIEnv* env, std::string* mime_type) const; |
+ bool GetCharset(JNIEnv* env, std::string* charset) const; |
+ |
+ private: |
+ base::android::ScopedJavaGlobalRef<jobject> java_object_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(InterceptedRequestData); |
+}; |
+ |
+bool RegisterInterceptedRequestData(JNIEnv* env); |
+ |
+#endif // CONTENT_BROWSER_ANDROID_INTERCEPTED_REQUEST_DATA_H_ |