OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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_INTERCEPTED_REQUEST_DATA_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_INTERCEPTED_REQUEST_DATA_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/android/scoped_java_ref.h" |
| 11 #include "base/memory/ref_counted.h" |
| 12 |
| 13 class InterceptedRequestData { |
| 14 public: |
| 15 InterceptedRequestData(JNIEnv* env, |
| 16 base::android::JavaRef<jobject> obj); |
| 17 ~InterceptedRequestData(); |
| 18 |
| 19 base::android::ScopedJavaLocalRef<jobject> GetInputStream(JNIEnv* env) const; |
| 20 bool GetMimeType(JNIEnv* env, std::string* mime_type) const; |
| 21 bool GetCharset(JNIEnv* env, std::string* charset) const; |
| 22 |
| 23 private: |
| 24 base::android::ScopedJavaGlobalRef<jobject> java_object_; |
| 25 |
| 26 DISALLOW_COPY_AND_ASSIGN(InterceptedRequestData); |
| 27 }; |
| 28 |
| 29 bool RegisterInterceptedRequestData(JNIEnv* env); |
| 30 |
| 31 #endif // CONTENT_BROWSER_ANDROID_INTERCEPTED_REQUEST_DATA_H_ |
OLD | NEW |