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

Side by Side Diff: ppapi/proxy/ppb_url_loader_proxy.h

Issue 10913257: Convert url request info to new proxy API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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) 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_completion_callback_factory.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 URLRequestInfoData;
24 24
25 namespace proxy { 25 namespace proxy {
26 26
27 struct PPBURLLoader_UpdateProgress_Params; 27 struct PPBURLLoader_UpdateProgress_Params;
28 28
29 class PPB_URLLoader_Proxy : public InterfaceProxy { 29 class PPB_URLLoader_Proxy : public InterfaceProxy {
30 public: 30 public:
31 PPB_URLLoader_Proxy(Dispatcher* dispatcher); 31 PPB_URLLoader_Proxy(Dispatcher* dispatcher);
32 virtual ~PPB_URLLoader_Proxy(); 32 virtual ~PPB_URLLoader_Proxy();
33 33
(...skipping 20 matching lines...) Expand all
54 static const ApiID kApiID = API_ID_PPB_URL_LOADER; 54 static const ApiID kApiID = API_ID_PPB_URL_LOADER;
55 55
56 private: 56 private:
57 // Data associated with callbacks for ReadResponseBody. 57 // Data associated with callbacks for ReadResponseBody.
58 struct ReadCallbackInfo; 58 struct ReadCallbackInfo;
59 59
60 // Plugin->renderer message handlers. 60 // Plugin->renderer message handlers.
61 void OnMsgCreate(PP_Instance instance, 61 void OnMsgCreate(PP_Instance instance,
62 HostResource* result); 62 HostResource* result);
63 void OnMsgOpen(const HostResource& loader, 63 void OnMsgOpen(const HostResource& loader,
64 const PPB_URLRequestInfo_Data& data); 64 const URLRequestInfoData& data);
65 void OnMsgFollowRedirect(const HostResource& loader); 65 void OnMsgFollowRedirect(const HostResource& loader);
66 void OnMsgGetResponseInfo(const HostResource& loader, 66 void OnMsgGetResponseInfo(const HostResource& loader,
67 HostResource* result); 67 HostResource* result);
68 void OnMsgReadResponseBody(const HostResource& loader, 68 void OnMsgReadResponseBody(const HostResource& loader,
69 int32_t bytes_to_read); 69 int32_t bytes_to_read);
70 void OnMsgFinishStreamingToFile(const HostResource& loader); 70 void OnMsgFinishStreamingToFile(const HostResource& loader);
71 void OnMsgClose(const HostResource& loader); 71 void OnMsgClose(const HostResource& loader);
72 void OnMsgGrantUniversalAccess(const HostResource& loader); 72 void OnMsgGrantUniversalAccess(const HostResource& loader);
73 73
74 // Renderer->plugin message handlers. 74 // Renderer->plugin message handlers.
(...skipping 11 matching lines...) Expand all
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 ProxyCompletionCallbackFactory<PPB_URLLoader_Proxy> callback_factory_; 89 ProxyCompletionCallbackFactory<PPB_URLLoader_Proxy> callback_factory_;
90 }; 90 };
91 91
92 } // namespace proxy 92 } // namespace proxy
93 } // namespace ppapi 93 } // namespace ppapi
94 94
95 #endif // PPAPI_PPB_URL_LOADER_PROXY_H_ 95 #endif // PPAPI_PPB_URL_LOADER_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698