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