[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef PPAPI_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ | ||||
6 | #define PPAPI_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ | ||||
7 | |||||
8 | #include "base/basictypes.h" | ||||
[email protected] | 859a7f3 | 2011-01-15 03:44:13 | [diff] [blame] | 9 | #include "ppapi/c/pp_instance.h" |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 10 | #include "ppapi/c/pp_resource.h" |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 11 | #include "ppapi/proxy/interface_proxy.h" |
[email protected] | be0a84b | 2011-08-13 04:18:44 | [diff] [blame] | 12 | #include "ppapi/shared_impl/host_resource.h" |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 13 | |
[email protected] | 5a3f6285 | 2010-11-10 21:43:01 | [diff] [blame] | 14 | struct PPB_URLRequestInfo; |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 15 | |
16 | namespace pp { | ||||
17 | namespace proxy { | ||||
18 | |||||
19 | class SerializedVarReceiveInput; | ||||
20 | |||||
21 | class PPB_URLRequestInfo_Proxy : public InterfaceProxy { | ||||
22 | public: | ||||
23 | PPB_URLRequestInfo_Proxy(Dispatcher* dispatcher, | ||||
24 | const void* target_interface); | ||||
25 | virtual ~PPB_URLRequestInfo_Proxy(); | ||||
26 | |||||
[email protected] | 465faa2 | 2011-02-08 16:31:46 | [diff] [blame] | 27 | static const Info* GetInfo(); |
28 | |||||
[email protected] | bf712f8e | 2011-06-17 02:10:45 | [diff] [blame] | 29 | static PP_Resource CreateProxyResource(PP_Instance instance); |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 30 | |
31 | // InterfaceProxy implementation. | ||||
[email protected] | a95986a8 | 2010-12-24 06:19:28 | [diff] [blame] | 32 | virtual bool OnMessageReceived(const IPC::Message& msg); |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 33 | |
34 | private: | ||||
35 | // Message handlers. | ||||
[email protected] | be0a84b | 2011-08-13 04:18:44 | [diff] [blame] | 36 | void OnMsgCreate(PP_Instance instance, ppapi::HostResource* result); |
37 | void OnMsgSetProperty(ppapi::HostResource request, | ||||
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 38 | int32_t property, |
39 | SerializedVarReceiveInput value); | ||||
[email protected] | be0a84b | 2011-08-13 04:18:44 | [diff] [blame] | 40 | void OnMsgAppendDataToBody(ppapi::HostResource request, |
[email protected] | 709a847e | 2010-11-10 01:16:11 | [diff] [blame] | 41 | const std::string& data); |
[email protected] | be0a84b | 2011-08-13 04:18:44 | [diff] [blame] | 42 | void OnMsgAppendFileToBody(ppapi::HostResource request, |
43 | ppapi::HostResource file_ref, | ||||
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 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); | ||||
49 | }; | ||||
50 | |||||
51 | } // namespace proxy | ||||
52 | } // namespace pp | ||||
53 | |||||
54 | #endif // PPAPI_PROXY_PPB_URL_REQUEST_INFO_PROXY_H_ |