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

Unified Diff: ppapi/proxy/ppb_audio_input_proxy.cc

Issue 8585013: Merge definitions of PlatformFileToInt and IntToPlatformFile to one place. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add PPAPI_SHARED_EXPORT to make component build work. Created 9 years, 1 month 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/broker_dispatcher.cc ('k') | ppapi/proxy/ppb_audio_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_audio_input_proxy.cc
diff --git a/ppapi/proxy/ppb_audio_input_proxy.cc b/ppapi/proxy/ppb_audio_input_proxy.cc
index e3b9b0573d992814b5142b662f9c999ced91d4ad..9427bb34675cb0fd2a649948b9f524139cac5bb4 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)) {
« no previous file with comments | « ppapi/proxy/broker_dispatcher.cc ('k') | ppapi/proxy/ppb_audio_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698