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

Side by Side Diff: ppapi/cpp/dev/url_response_info_dev.h

Issue 4747001: Move URLLoader, URLRequestInfo, and URLResponseInfo out of the dev directory... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/cpp/dev/url_request_info_dev.cc ('k') | ppapi/cpp/dev/url_response_info_dev.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 PPAPI_CPP_DEV_URL_RESPONSE_INFO_DEV_H_
6 #define PPAPI_CPP_DEV_URL_RESPONSE_INFO_DEV_H_
7
8 #include "ppapi/c/dev/ppb_url_response_info_dev.h"
9 #include "ppapi/cpp/resource.h"
10 #include "ppapi/cpp/var.h"
11
12 namespace pp {
13
14 class FileRef_Dev;
15
16 class URLResponseInfo_Dev : public Resource {
17 public:
18 // Creates an is_null() URLResponseInfo object.
19 URLResponseInfo_Dev() {}
20
21 // This constructor is used when we've gotten a PP_Resource as a return value
22 // that has already been addref'ed for us.
23 struct PassRef {};
24 URLResponseInfo_Dev(PassRef, PP_Resource resource);
25
26 URLResponseInfo_Dev(const URLResponseInfo_Dev& other);
27
28 URLResponseInfo_Dev& operator=(const URLResponseInfo_Dev& other);
29 void swap(URLResponseInfo_Dev& other);
30
31 // PPB_URLResponseInfo methods:
32 Var GetProperty(PP_URLResponseProperty_Dev property) const;
33 FileRef_Dev GetBody() const;
34
35 // Convenient helpers for getting properties:
36 Var GetURL() const {
37 return GetProperty(PP_URLRESPONSEPROPERTY_URL);
38 }
39 Var GetRedirectURL() const {
40 return GetProperty(PP_URLRESPONSEPROPERTY_REDIRECTURL);
41 }
42 Var GetRedirectMethod() const {
43 return GetProperty(PP_URLRESPONSEPROPERTY_REDIRECTMETHOD);
44 }
45 int32_t GetStatusCode() const {
46 return GetProperty(PP_URLRESPONSEPROPERTY_STATUSCODE).AsInt();
47 }
48 Var GetStatusLine() const {
49 return GetProperty(PP_URLRESPONSEPROPERTY_STATUSLINE);
50 }
51 Var GetHeaders() const {
52 return GetProperty(PP_URLRESPONSEPROPERTY_HEADERS);
53 }
54 };
55
56 } // namespace pp
57
58 #endif // PPAPI_CPP_DEV_URL_RESPONSE_INFO_DEV_H_
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/url_request_info_dev.cc ('k') | ppapi/cpp/dev/url_response_info_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698