OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/c/ppb_url_loader.h" | 14 #include "ppapi/c/ppb_url_loader.h" |
15 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" | 15 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" |
16 #include "ppapi/proxy/interface_proxy.h" | 16 #include "ppapi/proxy/interface_proxy.h" |
17 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" | 17 #include "ppapi/proxy/proxy_completion_callback_factory.h" |
18 #include "ppapi/shared_impl/host_resource.h" | 18 #include "ppapi/shared_impl/host_resource.h" |
19 #include "ppapi/utility/completion_callback_factory.h" | 19 #include "ppapi/utility/completion_callback_factory.h" |
20 | 20 |
21 namespace ppapi { | 21 namespace ppapi { |
22 | 22 |
23 struct PPB_URLRequestInfo_Data; | 23 struct PPB_URLRequestInfo_Data; |
24 | 24 |
25 namespace proxy { | 25 namespace proxy { |
26 | 26 |
27 struct PPBURLLoader_UpdateProgress_Params; | 27 struct PPBURLLoader_UpdateProgress_Params; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 const std::string& data); | 79 const std::string& data); |
80 void OnMsgCallbackComplete(const HostResource& host_resource, int32_t result); | 80 void OnMsgCallbackComplete(const HostResource& host_resource, int32_t result); |
81 | 81 |
82 // Handles callbacks for read complete messages. Takes ownership of the info | 82 // Handles callbacks for read complete messages. Takes ownership of the info |
83 // pointer. | 83 // pointer. |
84 void OnReadCallback(int32_t result, ReadCallbackInfo* info); | 84 void OnReadCallback(int32_t result, ReadCallbackInfo* info); |
85 | 85 |
86 // Handles callback for everything but reads. | 86 // Handles callback for everything but reads. |
87 void OnCallback(int32_t result, const HostResource& resource); | 87 void OnCallback(int32_t result, const HostResource& resource); |
88 | 88 |
89 pp::CompletionCallbackFactory<PPB_URLLoader_Proxy, | 89 ProxyCompletionCallbackFactory<PPB_URLLoader_Proxy> callback_factory_; |
90 ProxyNonThreadSafeRefCount> callback_factory_; | |
91 | 90 |
92 // Valid only in the host, this lazily-initialized pointer indicates the | 91 // Valid only in the host, this lazily-initialized pointer indicates the |
93 // URLLoaderTrusted interface. | 92 // URLLoaderTrusted interface. |
94 const PPB_URLLoaderTrusted* host_urlloader_trusted_interface_; | 93 const PPB_URLLoaderTrusted* host_urlloader_trusted_interface_; |
95 }; | 94 }; |
96 | 95 |
97 } // namespace proxy | 96 } // namespace proxy |
98 } // namespace ppapi | 97 } // namespace ppapi |
99 | 98 |
100 #endif // PPAPI_PPB_URL_LOADER_PROXY_H_ | 99 #endif // PPAPI_PPB_URL_LOADER_PROXY_H_ |
OLD | NEW |