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_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_resource.h" | |
11 #include "ppapi/proxy/interface_proxy.h" | 10 #include "ppapi/proxy/interface_proxy.h" |
12 #include "ppapi/shared_impl/host_resource.h" | |
13 | |
14 struct PPB_URLRequestInfo; | |
15 | 11 |
16 namespace ppapi { | 12 namespace ppapi { |
| 13 |
| 14 struct PPB_URLRequestInfo_Data; |
| 15 |
17 namespace proxy { | 16 namespace proxy { |
18 | 17 |
19 class SerializedVarReceiveInput; | |
20 | |
21 class PPB_URLRequestInfo_Proxy : public InterfaceProxy { | 18 class PPB_URLRequestInfo_Proxy : public InterfaceProxy { |
22 public: | 19 public: |
23 PPB_URLRequestInfo_Proxy(Dispatcher* dispatcher, | 20 PPB_URLRequestInfo_Proxy(Dispatcher* dispatcher, |
24 const void* target_interface); | 21 const void* target_interface); |
25 virtual ~PPB_URLRequestInfo_Proxy(); | 22 virtual ~PPB_URLRequestInfo_Proxy(); |
26 | 23 |
27 static const Info* GetInfo(); | 24 static const Info* GetInfo(); |
28 | 25 |
29 static PP_Resource CreateProxyResource(PP_Instance instance); | |
30 | |
31 // InterfaceProxy implementation. | 26 // InterfaceProxy implementation. |
32 virtual bool OnMessageReceived(const IPC::Message& msg); | 27 virtual bool OnMessageReceived(const IPC::Message& msg); |
33 | 28 |
34 private: | 29 private: |
35 // Message handlers. | |
36 void OnMsgCreate(PP_Instance instance, ppapi::HostResource* result); | |
37 void OnMsgSetProperty(ppapi::HostResource request, | |
38 int32_t property, | |
39 SerializedVarReceiveInput value); | |
40 void OnMsgAppendDataToBody(ppapi::HostResource request, | |
41 const std::string& data); | |
42 void OnMsgAppendFileToBody(ppapi::HostResource request, | |
43 ppapi::HostResource file_ref, | |
44 int64_t start_offset, | |
45 int64_t number_of_bytes, | |
46 double expected_last_modified_time); | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(PPB_URLRequestInfo_Proxy); | 30 DISALLOW_COPY_AND_ASSIGN(PPB_URLRequestInfo_Proxy); |
49 }; | 31 }; |
50 | 32 |
51 } // namespace proxy | 33 } // namespace proxy |
52 } // namespace ppapi | 34 } // namespace ppapi |
53 | 35 |
54 #endif // PPAPI_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ | 36 #endif // PPAPI_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ |
OLD | NEW |