diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-10 21:43:01 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-10 21:43:01 +0000 |
commit | 5a3f62856d89817d4117de189e855a6dad16c2ee (patch) | |
tree | a7df5acea5b54ea8ca795b0ba5a1dc90316d450e /ppapi/proxy | |
parent | 7631cf8806adf505db4fed53210e27d2d1dd2cd0 (diff) | |
download | chromium_src-5a3f62856d89817d4117de189e855a6dad16c2ee.zip chromium_src-5a3f62856d89817d4117de189e855a6dad16c2ee.tar.gz chromium_src-5a3f62856d89817d4117de189e855a6dad16c2ee.tar.bz2 |
Move URLLoader, URLRequestInfo, and URLResponseInfo out of the dev directory
and rename accordingly.
Rename URLResponseInfo.GetBody to GetBodyAsFileRef.
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/4747001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
-rw-r--r-- | ppapi/proxy/dispatcher.cc | 12 | ||||
-rw-r--r-- | ppapi/proxy/ppapi_messages_internal.h | 2 | ||||
-rw-r--r-- | ppapi/proxy/ppb_url_loader_proxy.cc | 4 | ||||
-rw-r--r-- | ppapi/proxy/ppb_url_loader_proxy.h | 6 | ||||
-rw-r--r-- | ppapi/proxy/ppb_url_request_info_proxy.cc | 8 | ||||
-rw-r--r-- | ppapi/proxy/ppb_url_request_info_proxy.h | 6 | ||||
-rw-r--r-- | ppapi/proxy/ppb_url_response_info_proxy.cc | 25 | ||||
-rw-r--r-- | ppapi/proxy/ppb_url_response_info_proxy.h | 9 |
8 files changed, 37 insertions, 35 deletions
diff --git a/ppapi/proxy/dispatcher.cc b/ppapi/proxy/dispatcher.cc index 476f403..eecc9a0 100644 --- a/ppapi/proxy/dispatcher.cc +++ b/ppapi/proxy/dispatcher.cc @@ -15,9 +15,6 @@ #include "ppapi/proxy/interface_proxy.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/c/dev/ppb_testing_dev.h" -#include "ppapi/c/dev/ppb_url_loader_dev.h" -#include "ppapi/c/dev/ppb_url_request_info_dev.h" -#include "ppapi/c/dev/ppb_url_response_info_dev.h" #include "ppapi/c/dev/ppb_var_deprecated.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_core.h" @@ -25,6 +22,9 @@ #include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_instance.h" #include "ppapi/c/ppp_instance.h" +#include "ppapi/c/ppb_url_loader.h" +#include "ppapi/c/ppb_url_request_info.h" +#include "ppapi/c/ppb_url_response_info.h" #include "ppapi/proxy/ppb_core_proxy.h" #include "ppapi/proxy/ppb_graphics_2d_proxy.h" #include "ppapi/proxy/ppb_image_data_proxy.h" @@ -213,11 +213,11 @@ InterfaceProxy* Dispatcher::CreateProxyForInterface( return new PPB_Instance_Proxy(this, interface_functions); if (interface_name == PPB_TESTING_DEV_INTERFACE) return new PPB_Testing_Proxy(this, interface_functions); - if (interface_name == PPB_URLLOADER_DEV_INTERFACE) + if (interface_name == PPB_URLLOADER_INTERFACE) return new PPB_URLLoader_Proxy(this, interface_functions); - if (interface_name == PPB_URLREQUESTINFO_DEV_INTERFACE) + if (interface_name == PPB_URLREQUESTINFO_INTERFACE) return new PPB_URLRequestInfo_Proxy(this, interface_functions); - if (interface_name == PPB_URLRESPONSEINFO_DEV_INTERFACE) + if (interface_name == PPB_URLRESPONSEINFO_INTERFACE) return new PPB_URLResponseInfo_Proxy(this, interface_functions); if (interface_name == PPB_VAR_DEPRECATED_INTERFACE) return new PPB_Var_Deprecated_Proxy(this, interface_functions); diff --git a/ppapi/proxy/ppapi_messages_internal.h b/ppapi/proxy/ppapi_messages_internal.h index e5a8222..9375d1d 100644 --- a/ppapi/proxy/ppapi_messages_internal.h +++ b/ppapi/proxy/ppapi_messages_internal.h @@ -313,7 +313,7 @@ IPC_BEGIN_MESSAGES(PpapiHost) PP_Resource /* response */, int32_t /* property */, pp::proxy::SerializedVar /* result */) - IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLResponseInfo_GetBody, + IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBURLResponseInfo_GetBodyAsFileRef, PP_Resource /* response */, PP_Resource /* file_ref_result */) diff --git a/ppapi/proxy/ppb_url_loader_proxy.cc b/ppapi/proxy/ppb_url_loader_proxy.cc index 481ceb9..230535d7 100644 --- a/ppapi/proxy/ppb_url_loader_proxy.cc +++ b/ppapi/proxy/ppb_url_loader_proxy.cc @@ -11,7 +11,7 @@ #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" #include "ppapi/c/pp_resource.h" -#include "ppapi/c/dev/ppb_url_loader_dev.h" +#include "ppapi/c/ppb_url_loader.h" #include "ppapi/proxy/host_dispatcher.h" #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/plugin_resource.h" @@ -188,7 +188,7 @@ void Close(PP_Resource loader_id) { INTERFACE_ID_PPB_URL_LOADER, loader_id)); } -const PPB_URLLoader_Dev ppb_urlloader = { +const PPB_URLLoader ppb_urlloader = { &Create, &IsURLLoader, &Open, diff --git a/ppapi/proxy/ppb_url_loader_proxy.h b/ppapi/proxy/ppb_url_loader_proxy.h index cc35677..cd767b0 100644 --- a/ppapi/proxy/ppb_url_loader_proxy.h +++ b/ppapi/proxy/ppb_url_loader_proxy.h @@ -14,7 +14,7 @@ #include "ppapi/c/pp_var.h" #include "ppapi/proxy/interface_proxy.h" -struct PPB_URLLoader_Dev; +struct PPB_URLLoader; namespace pp { namespace proxy { @@ -31,8 +31,8 @@ class PPB_URLLoader_Proxy : public InterfaceProxy, // proxied info for the given browser-supplied URLLoader resource ID. static void TrackPluginResource(PP_Resource url_loader_resource); - const PPB_URLLoader_Dev* ppb_url_loader_target() const { - return reinterpret_cast<const PPB_URLLoader_Dev*>(target_interface()); + const PPB_URLLoader* ppb_url_loader_target() const { + return reinterpret_cast<const PPB_URLLoader*>(target_interface()); } // InterfaceProxy implementation. diff --git a/ppapi/proxy/ppb_url_request_info_proxy.cc b/ppapi/proxy/ppb_url_request_info_proxy.cc index 2df496b..6a91286 100644 --- a/ppapi/proxy/ppb_url_request_info_proxy.cc +++ b/ppapi/proxy/ppb_url_request_info_proxy.cc @@ -4,7 +4,7 @@ #include "ppapi/proxy/ppb_url_request_info_proxy.h" -#include "ppapi/c/dev/ppb_url_request_info_dev.h" +#include "ppapi/c/ppb_url_request_info.h" #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/plugin_resource.h" #include "ppapi/proxy/ppapi_messages.h" @@ -44,7 +44,7 @@ PP_Bool IsURLRequestInfo(PP_Resource resource) { } PP_Bool SetProperty(PP_Resource request_id, - PP_URLRequestProperty_Dev property, + PP_URLRequestProperty property, PP_Var var) { Dispatcher* dispatcher = PluginDispatcher::Get(); dispatcher->Send(new PpapiHostMsg_PPBURLRequestInfo_SetProperty( @@ -84,7 +84,7 @@ PP_Bool AppendFileToBody(PP_Resource request_id, return PP_TRUE; } -const PPB_URLRequestInfo_Dev ppb_urlrequestinfo = { +const PPB_URLRequestInfo ppb_urlrequestinfo = { &Create, &IsURLRequestInfo, &SetProperty, @@ -135,7 +135,7 @@ void PPB_URLRequestInfo_Proxy::OnMsgSetProperty( int32_t property, SerializedVarReceiveInput value) { ppb_url_request_info_target()->SetProperty(request, - static_cast<PP_URLRequestProperty_Dev>(property), + static_cast<PP_URLRequestProperty>(property), value.Get(dispatcher())); } diff --git a/ppapi/proxy/ppb_url_request_info_proxy.h b/ppapi/proxy/ppb_url_request_info_proxy.h index 6acfd75..b620f4a 100644 --- a/ppapi/proxy/ppb_url_request_info_proxy.h +++ b/ppapi/proxy/ppb_url_request_info_proxy.h @@ -10,7 +10,7 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/proxy/interface_proxy.h" -struct PPB_URLRequestInfo_Dev; +struct PPB_URLRequestInfo; namespace pp { namespace proxy { @@ -23,8 +23,8 @@ class PPB_URLRequestInfo_Proxy : public InterfaceProxy { const void* target_interface); virtual ~PPB_URLRequestInfo_Proxy(); - const PPB_URLRequestInfo_Dev* ppb_url_request_info_target() const { - return static_cast<const PPB_URLRequestInfo_Dev*>(target_interface()); + const PPB_URLRequestInfo* ppb_url_request_info_target() const { + return static_cast<const PPB_URLRequestInfo*>(target_interface()); } // InterfaceProxy implementation. diff --git a/ppapi/proxy/ppb_url_response_info_proxy.cc b/ppapi/proxy/ppb_url_response_info_proxy.cc index 2fbd452..c85150e 100644 --- a/ppapi/proxy/ppb_url_response_info_proxy.cc +++ b/ppapi/proxy/ppb_url_response_info_proxy.cc @@ -4,7 +4,7 @@ #include "ppapi/proxy/ppb_url_response_info_proxy.h" -#include "ppapi/c/dev/ppb_url_response_info_dev.h" +#include "ppapi/c/ppb_url_response_info.h" #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/plugin_resource.h" #include "ppapi/proxy/ppapi_messages.h" @@ -32,7 +32,7 @@ PP_Bool IsURLResponseInfo(PP_Resource resource) { return BoolToPPBool(!!object); } -PP_Var GetProperty(PP_Resource response, PP_URLResponseProperty_Dev property) { +PP_Var GetProperty(PP_Resource response, PP_URLResponseProperty property) { Dispatcher* dispatcher = PluginDispatcher::Get(); ReceiveSerializedVarReturnValue result; dispatcher->Send(new PpapiHostMsg_PPBURLResponseInfo_GetProperty( @@ -40,11 +40,11 @@ PP_Var GetProperty(PP_Resource response, PP_URLResponseProperty_Dev property) { return result.Return(dispatcher); } -PP_Resource GetBody(PP_Resource response) { +PP_Resource GetBodyAsFileRef(PP_Resource response) { PP_Resource result = 0; /* Dispatcher* dispatcher = PluginDispatcher::Get(); - dispatcher->Send(new PpapiHostMsg_PPBURLResponseInfo_GetBody( + dispatcher->Send(new PpapiHostMsg_PPBURLResponseInfo_GetBodyAsFileRef( INTERFACE_ID_PPB_URL_RESPONSE_INFO, response, &result)); // TODO(brettw) when we have FileRef proxied, make an object from that // ref so we can track it properly and then uncomment this. @@ -52,10 +52,10 @@ PP_Resource GetBody(PP_Resource response) { return result; } -const PPB_URLResponseInfo_Dev ppb_urlresponseinfo = { +const PPB_URLResponseInfo ppb_urlresponseinfo = { &IsURLResponseInfo, &GetProperty, - &GetBody + &GetBodyAsFileRef }; } // namespace @@ -89,8 +89,8 @@ void PPB_URLResponseInfo_Proxy::OnMessageReceived(const IPC::Message& msg) { IPC_BEGIN_MESSAGE_MAP(PPB_URLResponseInfo_Proxy, msg) IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLResponseInfo_GetProperty, OnMsgGetProperty) - IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLResponseInfo_GetBody, - OnMsgGetBody) + IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBURLResponseInfo_GetBodyAsFileRef, + OnMsgGetBodyAsFileRef) IPC_END_MESSAGE_MAP() // TODO(brettw): handle bad messages. } @@ -100,12 +100,13 @@ void PPB_URLResponseInfo_Proxy::OnMsgGetProperty( int32_t property, SerializedVarReturnValue result) { result.Return(dispatcher(), ppb_url_response_info_target()->GetProperty( - response, static_cast<PP_URLResponseProperty_Dev>(property))); + response, static_cast<PP_URLResponseProperty>(property))); } -void PPB_URLResponseInfo_Proxy::OnMsgGetBody(PP_Resource response, - PP_Resource* file_ref_result) { - *file_ref_result = ppb_url_response_info_target()->GetBody(response); +void PPB_URLResponseInfo_Proxy::OnMsgGetBodyAsFileRef( + PP_Resource response, + PP_Resource* file_ref_result) { + *file_ref_result = ppb_url_response_info_target()->GetBodyAsFileRef(response); } } // namespace proxy diff --git a/ppapi/proxy/ppb_url_response_info_proxy.h b/ppapi/proxy/ppb_url_response_info_proxy.h index 639ddbe..423ca3e 100644 --- a/ppapi/proxy/ppb_url_response_info_proxy.h +++ b/ppapi/proxy/ppb_url_response_info_proxy.h @@ -10,7 +10,7 @@ #include "ppapi/c/pp_resource.h" #include "ppapi/proxy/interface_proxy.h" -struct PPB_URLResponseInfo_Dev; +struct PPB_URLResponseInfo; namespace pp { namespace proxy { @@ -28,8 +28,8 @@ class PPB_URLResponseInfo_Proxy : public InterfaceProxy { // a response info object in the plugin. static void TrackPluginResource(PP_Resource response_resource); - const PPB_URLResponseInfo_Dev* ppb_url_response_info_target() const { - return static_cast<const PPB_URLResponseInfo_Dev*>(target_interface()); + const PPB_URLResponseInfo* ppb_url_response_info_target() const { + return static_cast<const PPB_URLResponseInfo*>(target_interface()); } // InterfaceProxy implementation. @@ -42,7 +42,8 @@ class PPB_URLResponseInfo_Proxy : public InterfaceProxy { void OnMsgGetProperty(PP_Resource response, int32_t property, SerializedVarReturnValue result); - void OnMsgGetBody(PP_Resource response, PP_Resource* file_ref_result); + void OnMsgGetBodyAsFileRef(PP_Resource response, + PP_Resource* file_ref_result); DISALLOW_COPY_AND_ASSIGN(PPB_URLResponseInfo_Proxy); }; |