diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-01 05:51:27 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-01 05:51:27 +0000 |
commit | 4697f72f5bdb2ead8aa9051b47fb0fade5acd1f5 (patch) | |
tree | 4b27e9a2b6f932059c57c20aed2f4841f5a15d0a /ppapi/proxy/ppb_audio_proxy.cc | |
parent | 2f89b6045896d8e8efc3984da72c3bf4c63d6e0f (diff) | |
download | chromium_src-4697f72f5bdb2ead8aa9051b47fb0fade5acd1f5.zip chromium_src-4697f72f5bdb2ead8aa9051b47fb0fade5acd1f5.tar.gz chromium_src-4697f72f5bdb2ead8aa9051b47fb0fade5acd1f5.tar.bz2 |
Revert 87415 - Convert more interfaces to the new thunk system. This goes up to and including
the ones starting with "F".
Since this adds a lot more interfaces, I added the macro stuff we used for the
old system to generate the various template specializations. This involded a
lot of renaming since the As* needs to match the name (I was previously leaving
off the "PPB_" part). I did other misc cleanup to the infrastructure.
Review URL: http://codereview.chromium.org/7082036
TBR=brettw@chromium.org
Review URL: http://codereview.chromium.org/7006022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_audio_proxy.cc')
-rw-r--r-- | ppapi/proxy/ppb_audio_proxy.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc index 22ddddd..6c2cc7a 100644 --- a/ppapi/proxy/ppb_audio_proxy.cc +++ b/ppapi/proxy/ppb_audio_proxy.cc @@ -10,7 +10,6 @@ #include "ppapi/c/ppb_audio_config.h" #include "ppapi/c/ppb_var.h" #include "ppapi/c/trusted/ppb_audio_trusted.h" -#include "ppapi/proxy/enter_proxy.h" #include "ppapi/proxy/interface_id.h" #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/plugin_resource.h" @@ -22,8 +21,6 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" -using ::ppapi::thunk::PPB_Audio_API; - namespace pp { namespace proxy { @@ -36,7 +33,7 @@ class Audio : public PluginResource, public ppapi::AudioImpl { virtual ~Audio(); // ResourceObjectBase overrides. - virtual PPB_Audio_API* AsPPB_Audio_API(); + virtual ::ppapi::thunk::PPB_Audio_API* AsAudio_API(); // PPB_Audio_API implementation. virtual PP_Resource GetCurrentConfig() OVERRIDE; @@ -65,7 +62,7 @@ Audio::~Audio() { PluginResourceTracker::GetInstance()->ReleaseResource(config_); } -PPB_Audio_API* Audio::AsPPB_Audio_API() { +::ppapi::thunk::PPB_Audio_API* Audio::AsAudio_API() { return this; } @@ -235,7 +232,11 @@ void PPB_Audio_Proxy::OnMsgNotifyAudioStreamCreated( IPC::PlatformFileForTransit socket_handle, base::SharedMemoryHandle handle, uint32_t length) { - EnterPluginFromHostResource<PPB_Audio_API> enter(audio_id); + PP_Resource plugin_resource = + PluginResourceTracker::GetInstance()->PluginResourceForHostResource( + audio_id); + ppapi::thunk::EnterResource<ppapi::thunk::PPB_Audio_API> enter( + plugin_resource, false); if (enter.failed() || result_code != PP_OK) { // The caller may still have given us these handles in the failure case. // The easiest way to clean these up is to just put them in the objects @@ -243,11 +244,11 @@ void PPB_Audio_Proxy::OnMsgNotifyAudioStreamCreated( base::SyncSocket temp_socket( IPC::PlatformFileForTransitToPlatformFile(socket_handle)); base::SharedMemory temp_mem(handle, false); - } else { - static_cast<Audio*>(enter.object())->SetStreamInfo( - handle, length, - IPC::PlatformFileForTransitToPlatformFile(socket_handle)); + return; } + Audio* audio = static_cast<Audio*>(enter.object()); + audio->SetStreamInfo( + handle, length, IPC::PlatformFileForTransitToPlatformFile(socket_handle)); } void PPB_Audio_Proxy::AudioChannelConnected( |