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

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

Issue 5828003: Move the Pepper implementation from webkit/glue/plugins/pepper_* to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 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 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_GLUE_PLUGINS_PEPPER_URL_REQUEST_INFO_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_URL_REQUEST_INFO_IMPL_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_URL_REQUEST_INFO_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_URL_REQUEST_INFO_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "ppapi/c/ppb_url_request_info.h" 12 #include "ppapi/c/ppb_url_request_info.h"
13 #include "webkit/glue/plugins/pepper_file_ref.h" 13 #include "webkit/plugins/ppapi/resource.h"
14 #include "webkit/glue/plugins/pepper_resource.h"
15 14
16 namespace WebKit { 15 namespace WebKit {
17 class WebFrame; 16 class WebFrame;
18 class WebURLRequest; 17 class WebURLRequest;
19 } 18 }
20 19
21 namespace pepper { 20 namespace webkit {
21 namespace plugins {
22 namespace ppapi {
22 23
23 class URLRequestInfo : public Resource { 24 class PPB_FileRef_Impl;
25
26 class PPB_URLRequestInfo_Impl : public Resource {
24 public: 27 public:
25 explicit URLRequestInfo(PluginModule* module); 28 explicit PPB_URLRequestInfo_Impl(PluginModule* module);
26 virtual ~URLRequestInfo(); 29 virtual ~PPB_URLRequestInfo_Impl();
27 30
28 // Returns a pointer to the interface implementing PPB_URLRequestInfo that is 31 // Returns a pointer to the interface implementing PPB_URLRequestInfo that is
29 // exposed to the plugin. 32 // exposed to the plugin.
30 static const PPB_URLRequestInfo* GetInterface(); 33 static const PPB_URLRequestInfo* GetInterface();
31 34
32 // Resource overrides. 35 // Resource overrides.
33 virtual URLRequestInfo* AsURLRequestInfo(); 36 virtual PPB_URLRequestInfo_Impl* AsURLRequestInfo();
34 37
35 // PPB_URLRequestInfo implementation. 38 // PPB_URLRequestInfo implementation.
36 bool SetBooleanProperty(PP_URLRequestProperty property, bool value); 39 bool SetBooleanProperty(PP_URLRequestProperty property, bool value);
37 bool SetStringProperty(PP_URLRequestProperty property, 40 bool SetStringProperty(PP_URLRequestProperty property,
38 const std::string& value); 41 const std::string& value);
39 bool AppendDataToBody(const std::string& data); 42 bool AppendDataToBody(const std::string& data);
40 bool AppendFileToBody(FileRef* file_ref, 43 bool AppendFileToBody(PPB_FileRef_Impl* file_ref,
41 int64_t start_offset, 44 int64_t start_offset,
42 int64_t number_of_bytes, 45 int64_t number_of_bytes,
43 PP_Time expected_last_modified_time); 46 PP_Time expected_last_modified_time);
44 47
45 WebKit::WebURLRequest ToWebURLRequest(WebKit::WebFrame* frame) const; 48 WebKit::WebURLRequest ToWebURLRequest(WebKit::WebFrame* frame) const;
46 49
47 bool follow_redirects() { return follow_redirects_; } 50 bool follow_redirects() { return follow_redirects_; }
48 51
49 bool record_download_progress() const { return record_download_progress_; } 52 bool record_download_progress() const { return record_download_progress_; }
50 bool record_upload_progress() const { return record_upload_progress_; } 53 bool record_upload_progress() const { return record_upload_progress_; }
51 54
52 private: 55 private:
53 struct BodyItem; 56 struct BodyItem;
54 typedef std::vector<BodyItem> Body; 57 typedef std::vector<BodyItem> Body;
55 58
56 std::string url_; 59 std::string url_;
57 std::string method_; 60 std::string method_;
58 std::string headers_; 61 std::string headers_;
59 Body body_; 62 Body body_;
60 63
61 bool stream_to_file_; 64 bool stream_to_file_;
62 bool follow_redirects_; 65 bool follow_redirects_;
63 bool record_download_progress_; 66 bool record_download_progress_;
64 bool record_upload_progress_; 67 bool record_upload_progress_;
68
69 DISALLOW_COPY_AND_ASSIGN(PPB_URLRequestInfo_Impl);
65 }; 70 };
66 71
67 } // namespace pepper 72 } // namespace ppapi
73 } // namespace plugins
74 } // namespace webkit
68 75
69 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_REQUEST_INFO_H_ 76 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_REQUEST_INFO_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698