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

Side by Side Diff: android_webview/browser/net/aw_web_resource_response.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_BROWSER_NET_AW_WEB_RESOURCE_RESPONSE_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_NET_AW_WEB_RESOURCE_RESPONSE_H_
6 #define ANDROID_WEBVIEW_BROWSER_NET_AW_WEB_RESOURCE_RESPONSE_H_ 6 #define ANDROID_WEBVIEW_BROWSER_NET_AW_WEB_RESOURCE_RESPONSE_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/android/jni_android.h" 11 #include "base/android/jni_android.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 13
14 namespace net { 14 namespace net {
15 class HttpResponseHeaders; 15 class HttpResponseHeaders;
16 class NetworkDelegate; 16 class NetworkDelegate;
17 class URLRequest; 17 class URLRequest;
18 } 18 }
19 19
20 namespace android_webview { 20 namespace android_webview {
21 21
22 class InputStream; 22 class InputStream;
23 23
24 // This class represents the Java-side data that is to be used to complete a 24 // This class represents the Java-side data that is to be used to complete a
25 // particular URLRequest. 25 // particular URLRequest.
26 class AwWebResourceResponse { 26 class AwWebResourceResponse {
27 public: 27 public:
28 virtual ~AwWebResourceResponse() {} 28 virtual ~AwWebResourceResponse() {}
29 29
30 virtual scoped_ptr<InputStream> GetInputStream(JNIEnv* env) const = 0; 30 virtual std::unique_ptr<InputStream> GetInputStream(JNIEnv* env) const = 0;
31 virtual bool GetMimeType(JNIEnv* env, std::string* mime_type) const = 0; 31 virtual bool GetMimeType(JNIEnv* env, std::string* mime_type) const = 0;
32 virtual bool GetCharset(JNIEnv* env, std::string* charset) const = 0; 32 virtual bool GetCharset(JNIEnv* env, std::string* charset) const = 0;
33 virtual bool GetStatusInfo(JNIEnv* env, 33 virtual bool GetStatusInfo(JNIEnv* env,
34 int* status_code, 34 int* status_code,
35 std::string* reason_phrase) const = 0; 35 std::string* reason_phrase) const = 0;
36 // If true is returned then |headers| contain the headers, if false is 36 // If true is returned then |headers| contain the headers, if false is
37 // returned |headers| were not updated. 37 // returned |headers| were not updated.
38 virtual bool GetResponseHeaders( 38 virtual bool GetResponseHeaders(
39 JNIEnv* env, 39 JNIEnv* env,
40 net::HttpResponseHeaders* headers) const = 0; 40 net::HttpResponseHeaders* headers) const = 0;
41 41
42 protected: 42 protected:
43 AwWebResourceResponse() {} 43 AwWebResourceResponse() {}
44 44
45 private: 45 private:
46 DISALLOW_COPY_AND_ASSIGN(AwWebResourceResponse); 46 DISALLOW_COPY_AND_ASSIGN(AwWebResourceResponse);
47 }; 47 };
48 48
49 } // namespace android_webview 49 } // namespace android_webview
50 50
51 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_WEB_RESOURCE_RESPONSE_H_ 51 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_WEB_RESOURCE_RESPONSE_H_
OLDNEW
« no previous file with comments | « android_webview/browser/net/aw_url_request_job_factory.cc ('k') | android_webview/browser/net/init_native_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698