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

Side by Side Diff: webkit/plugins/ppapi/ppb_url_response_info_impl.h

Issue 7669055: Remove webkit::ppapi::Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nulls auditeed Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
11 #include "ppapi/c/ppb_url_response_info.h" 12 #include "ppapi/c/ppb_url_response_info.h"
13 #include "ppapi/shared_impl/resource.h"
12 #include "ppapi/thunk/ppb_url_response_info_api.h" 14 #include "ppapi/thunk/ppb_url_response_info_api.h"
13 #include "webkit/plugins/ppapi/resource.h"
14 15
15 namespace WebKit { 16 namespace WebKit {
16 class WebURLResponse; 17 class WebURLResponse;
17 } 18 }
18 19
19 namespace webkit { 20 namespace webkit {
20 namespace ppapi { 21 namespace ppapi {
21 22
22 class PPB_FileRef_Impl; 23 class PPB_FileRef_Impl;
23 24
24 class PPB_URLResponseInfo_Impl 25 class PPB_URLResponseInfo_Impl
25 : public Resource, 26 : public ::ppapi::Resource,
26 public ::ppapi::thunk::PPB_URLResponseInfo_API { 27 public ::ppapi::thunk::PPB_URLResponseInfo_API {
27 public: 28 public:
28 explicit PPB_URLResponseInfo_Impl(PluginInstance* instance); 29 explicit PPB_URLResponseInfo_Impl(PP_Instance instance);
29 virtual ~PPB_URLResponseInfo_Impl(); 30 virtual ~PPB_URLResponseInfo_Impl();
30 31
31 bool Initialize(const WebKit::WebURLResponse& response); 32 bool Initialize(const WebKit::WebURLResponse& response);
32 33
33 // Resource overrides. 34 // Resource overrides.
34 virtual PPB_URLResponseInfo_API* AsPPB_URLResponseInfo_API() OVERRIDE; 35 virtual PPB_URLResponseInfo_API* AsPPB_URLResponseInfo_API() OVERRIDE;
35 36
36 // PPB_URLResponseInfo_API implementation. 37 // PPB_URLResponseInfo_API implementation.
37 virtual PP_Var GetProperty(PP_URLResponseProperty property) OVERRIDE; 38 virtual PP_Var GetProperty(PP_URLResponseProperty property) OVERRIDE;
38 virtual PP_Resource GetBodyAsFileRef() OVERRIDE; 39 virtual PP_Resource GetBodyAsFileRef() OVERRIDE;
39 40
40 PPB_FileRef_Impl* body() { return body_; } 41 PPB_FileRef_Impl* body() { return body_; }
41 std::string redirect_url() { return redirect_url_; } 42 std::string redirect_url() { return redirect_url_; }
42 43
43 private: 44 private:
44 std::string url_; 45 std::string url_;
45 std::string headers_; 46 std::string headers_;
46 int32_t status_code_; 47 int32_t status_code_;
47 std::string status_text_; 48 std::string status_text_;
48 std::string redirect_url_; 49 std::string redirect_url_;
49 scoped_refptr<PPB_FileRef_Impl> body_; 50 scoped_refptr<PPB_FileRef_Impl> body_;
50 51
51 DISALLOW_COPY_AND_ASSIGN(PPB_URLResponseInfo_Impl); 52 DISALLOW_COPY_AND_ASSIGN(PPB_URLResponseInfo_Impl);
52 }; 53 };
53 54
54 } // namespace ppapi 55 } // namespace ppapi
55 } // namespace webkit 56 } // namespace webkit
56 57
57 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_ 58 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_RESPONSE_INFO_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_url_request_info_impl.cc ('k') | webkit/plugins/ppapi/ppb_url_response_info_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698