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

Side by Side Diff: android_webview/native/aw_web_resource_response_impl.h

Issue 1852513003: Convert //android_webview to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git is hard Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_
6 #define ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_ 6 #define ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_
7 7
8 #include <memory>
9
8 #include "android_webview/browser/net/aw_web_resource_response.h" 10 #include "android_webview/browser/net/aw_web_resource_response.h"
9 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
10 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 14
14 namespace net { 15 namespace net {
15 class HttpResponseHeaders; 16 class HttpResponseHeaders;
16 } 17 }
17 18
18 namespace android_webview { 19 namespace android_webview {
19 20
20 class InputStream; 21 class InputStream;
21 22
22 class AwWebResourceResponseImpl : public AwWebResourceResponse { 23 class AwWebResourceResponseImpl : public AwWebResourceResponse {
23 public: 24 public:
24 // It is expected that |obj| is an instance of the Java-side 25 // It is expected that |obj| is an instance of the Java-side
25 // org.chromium.android_webview.AwWebResourceResponse class. 26 // org.chromium.android_webview.AwWebResourceResponse class.
26 AwWebResourceResponseImpl(const base::android::JavaRef<jobject>& obj); 27 AwWebResourceResponseImpl(const base::android::JavaRef<jobject>& obj);
27 ~AwWebResourceResponseImpl() override; 28 ~AwWebResourceResponseImpl() override;
28 29
29 scoped_ptr<InputStream> GetInputStream(JNIEnv* env) const override; 30 std::unique_ptr<InputStream> GetInputStream(JNIEnv* env) const override;
30 bool GetMimeType(JNIEnv* env, std::string* mime_type) const override; 31 bool GetMimeType(JNIEnv* env, std::string* mime_type) const override;
31 bool GetCharset(JNIEnv* env, std::string* charset) const override; 32 bool GetCharset(JNIEnv* env, std::string* charset) const override;
32 bool GetStatusInfo(JNIEnv* env, 33 bool GetStatusInfo(JNIEnv* env,
33 int* status_code, 34 int* status_code,
34 std::string* reason_phrase) const override; 35 std::string* reason_phrase) const override;
35 bool GetResponseHeaders(JNIEnv* env, 36 bool GetResponseHeaders(JNIEnv* env,
36 net::HttpResponseHeaders* headers) const override; 37 net::HttpResponseHeaders* headers) const override;
37 38
38 private: 39 private:
39 base::android::ScopedJavaGlobalRef<jobject> java_object_; 40 base::android::ScopedJavaGlobalRef<jobject> java_object_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(AwWebResourceResponseImpl); 42 DISALLOW_COPY_AND_ASSIGN(AwWebResourceResponseImpl);
42 }; 43 };
43 44
44 bool RegisterAwWebResourceResponse(JNIEnv* env); 45 bool RegisterAwWebResourceResponse(JNIEnv* env);
45 46
46 } // namespace android_webview 47 } // namespace android_webview
47 48
48 #endif // ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_ 49 #endif // ANDROID_WEBVIEW_NATIVE_INTERCEPTED_REQUEST_DATA_IMPL_H_
OLDNEW
« no previous file with comments | « android_webview/native/aw_web_contents_delegate.cc ('k') | android_webview/native/aw_web_resource_response_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698