Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(975)

Unified Diff: ppapi/proxy/ppb_audio_proxy.cc

Issue 7006022: Revert 87415 - Convert more interfaces to the new thunk system. This goes up to and including (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppb_audio_config_proxy.cc ('k') | ppapi/proxy/ppb_broker_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_audio_proxy.cc
===================================================================
--- ppapi/proxy/ppb_audio_proxy.cc (revision 87436)
+++ ppapi/proxy/ppb_audio_proxy.cc (working copy)
@@ -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 @@
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 @@
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 @@
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 @@
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(
« no previous file with comments | « ppapi/proxy/ppb_audio_config_proxy.cc ('k') | ppapi/proxy/ppb_broker_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698