OLD | NEW |
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 PPAPI_PPB_URL_LOADER_PROXY_H_ | 5 #ifndef PPAPI_PPB_URL_LOADER_PROXY_H_ |
6 #define PPAPI_PPB_URL_LOADER_PROXY_H_ | 6 #define PPAPI_PPB_URL_LOADER_PROXY_H_ |
7 | 7 |
8 #include "ppapi/c/pp_completion_callback.h" | 8 #include "ppapi/c/pp_completion_callback.h" |
9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_module.h" | 10 #include "ppapi/c/pp_module.h" |
11 #include "ppapi/c/pp_resource.h" | 11 #include "ppapi/c/pp_resource.h" |
12 #include "ppapi/c/pp_size.h" | 12 #include "ppapi/c/pp_size.h" |
13 #include "ppapi/c/pp_var.h" | 13 #include "ppapi/c/pp_var.h" |
14 #include "ppapi/cpp/completion_callback.h" | 14 #include "ppapi/cpp/completion_callback.h" |
15 #include "ppapi/proxy/interface_proxy.h" | 15 #include "ppapi/proxy/interface_proxy.h" |
16 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" | 16 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" |
17 #include "ppapi/shared_impl/host_resource.h" | 17 #include "ppapi/shared_impl/host_resource.h" |
18 | 18 |
19 struct PPB_URLLoader; | 19 struct PPB_URLLoader; |
20 struct PPB_URLLoaderTrusted; | 20 struct PPB_URLLoaderTrusted; |
21 | 21 |
22 namespace ppapi { | 22 namespace ppapi { |
| 23 |
| 24 struct PPB_URLRequestInfo_Data; |
| 25 |
23 namespace proxy { | 26 namespace proxy { |
24 | 27 |
25 struct PPBURLLoader_UpdateProgress_Params; | 28 struct PPBURLLoader_UpdateProgress_Params; |
26 | 29 |
27 class PPB_URLLoader_Proxy : public InterfaceProxy { | 30 class PPB_URLLoader_Proxy : public InterfaceProxy { |
28 public: | 31 public: |
29 PPB_URLLoader_Proxy(Dispatcher* dispatcher, const void* target_interface); | 32 PPB_URLLoader_Proxy(Dispatcher* dispatcher, const void* target_interface); |
30 virtual ~PPB_URLLoader_Proxy(); | 33 virtual ~PPB_URLLoader_Proxy(); |
31 | 34 |
32 static const Info* GetInfo(); | 35 static const Info* GetInfo(); |
(...skipping 22 matching lines...) Expand all Loading... |
55 void PrepareURLLoaderForSendingToPlugin(PP_Resource resource); | 58 void PrepareURLLoaderForSendingToPlugin(PP_Resource resource); |
56 | 59 |
57 private: | 60 private: |
58 // Data associated with callbacks for ReadResponseBody. | 61 // Data associated with callbacks for ReadResponseBody. |
59 struct ReadCallbackInfo; | 62 struct ReadCallbackInfo; |
60 | 63 |
61 // Plugin->renderer message handlers. | 64 // Plugin->renderer message handlers. |
62 void OnMsgCreate(PP_Instance instance, | 65 void OnMsgCreate(PP_Instance instance, |
63 ppapi::HostResource* result); | 66 ppapi::HostResource* result); |
64 void OnMsgOpen(const ppapi::HostResource& loader, | 67 void OnMsgOpen(const ppapi::HostResource& loader, |
65 const ppapi::HostResource& request_info, | 68 const PPB_URLRequestInfo_Data& data, |
66 uint32_t serialized_callback); | 69 uint32_t serialized_callback); |
67 void OnMsgFollowRedirect(const ppapi::HostResource& loader, | 70 void OnMsgFollowRedirect(const ppapi::HostResource& loader, |
68 uint32_t serialized_callback); | 71 uint32_t serialized_callback); |
69 void OnMsgGetResponseInfo(const ppapi::HostResource& loader, | 72 void OnMsgGetResponseInfo(const ppapi::HostResource& loader, |
70 ppapi::HostResource* result); | 73 ppapi::HostResource* result); |
71 void OnMsgReadResponseBody(const ppapi::HostResource& loader, | 74 void OnMsgReadResponseBody(const ppapi::HostResource& loader, |
72 int32_t bytes_to_read); | 75 int32_t bytes_to_read); |
73 void OnMsgFinishStreamingToFile(const ppapi::HostResource& loader, | 76 void OnMsgFinishStreamingToFile(const ppapi::HostResource& loader, |
74 uint32_t serialized_callback); | 77 uint32_t serialized_callback); |
75 void OnMsgClose(const ppapi::HostResource& loader); | 78 void OnMsgClose(const ppapi::HostResource& loader); |
(...skipping 15 matching lines...) Expand all Loading... |
91 | 94 |
92 // Valid only in the host, this lazily-initialized pointer indicates the | 95 // Valid only in the host, this lazily-initialized pointer indicates the |
93 // URLLoaderTrusted interface. | 96 // URLLoaderTrusted interface. |
94 const PPB_URLLoaderTrusted* host_urlloader_trusted_interface_; | 97 const PPB_URLLoaderTrusted* host_urlloader_trusted_interface_; |
95 }; | 98 }; |
96 | 99 |
97 } // namespace proxy | 100 } // namespace proxy |
98 } // namespace ppapi | 101 } // namespace ppapi |
99 | 102 |
100 #endif // PPAPI_PPB_URL_LOADER_PROXY_H_ | 103 #endif // PPAPI_PPB_URL_LOADER_PROXY_H_ |
OLD | NEW |