diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-23 23:46:46 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-23 23:46:46 +0000 |
commit | 5a77eca1f12943edb45b032219da0f32057240fd (patch) | |
tree | b08f598e12e42cfffeead23307ebcf61afc622f1 /ppapi/proxy/ppb_audio_input_proxy.cc | |
parent | 5f903b636a1cb8cff34eff4c51be7d7948744025 (diff) | |
download | chromium_src-5a77eca1f12943edb45b032219da0f32057240fd.zip chromium_src-5a77eca1f12943edb45b032219da0f32057240fd.tar.gz chromium_src-5a77eca1f12943edb45b032219da0f32057240fd.tar.bz2 |
Merge definitions of PlatformFileToInt and IntToPlatformFile to one place.
BUG=none
TEST=normal browsing on m17
Review URL: http://codereview.chromium.org/8585013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111447 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_audio_input_proxy.cc')
-rw-r--r-- | ppapi/proxy/ppb_audio_input_proxy.cc | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/ppapi/proxy/ppb_audio_input_proxy.cc b/ppapi/proxy/ppb_audio_input_proxy.cc index e3b9b05..9427bb3 100644 --- a/ppapi/proxy/ppb_audio_input_proxy.cc +++ b/ppapi/proxy/ppb_audio_input_proxy.cc @@ -16,6 +16,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/api_id.h" #include "ppapi/shared_impl/audio_input_impl.h" +#include "ppapi/shared_impl/platform_file.h" #include "ppapi/shared_impl/ppapi_globals.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/thunk/enter.h" @@ -23,6 +24,7 @@ #include "ppapi/thunk/resource_creation_api.h" #include "ppapi/thunk/thunk.h" +using ppapi::IntToPlatformFile; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_AudioInput_API; using ppapi::thunk::PPB_AudioConfig_API; @@ -116,22 +118,6 @@ int32_t AudioInput::GetSharedMemory(int* shm_handle, uint32_t* shm_size) { return PP_ERROR_NOTSUPPORTED; // Don't proxy the trusted interface. } -namespace { - -base::PlatformFile IntToPlatformFile(int32_t handle) { - // TODO(piman/brettw): Change trusted interface to return a PP_FileHandle, - // those casts are ugly. -#if defined(OS_WIN) - return reinterpret_cast<HANDLE>(static_cast<intptr_t>(handle)); -#elif defined(OS_POSIX) - return handle; -#else - #error Not implemented. -#endif -} - -} // namespace - PPB_AudioInput_Proxy::PPB_AudioInput_Proxy(Dispatcher* dispatcher) : InterfaceProxy(dispatcher), callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |