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

Unified Diff: ppapi/proxy/ppb_broker_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/ppb_audio_proxy.cc ('k') | ppapi/shared_impl/platform_file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_broker_proxy.cc
diff --git a/ppapi/proxy/ppb_broker_proxy.cc b/ppapi/proxy/ppb_broker_proxy.cc
index d65af6685620944970038bf39a1b641031e79b5a..657c5f5ed3930ae8f3bd4e007d7a0af7b2ba16d0 100644
--- a/ppapi/proxy/ppb_broker_proxy.cc
+++ b/ppapi/proxy/ppb_broker_proxy.cc
@@ -10,46 +10,25 @@
#include "ppapi/proxy/enter_proxy.h"
#include "ppapi/proxy/plugin_dispatcher.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "ppapi/shared_impl/platform_file.h"
#include "ppapi/thunk/ppb_broker_api.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/resource_creation_api.h"
#include "ppapi/thunk/thunk.h"
+using ppapi::IntToPlatformFile;
+using ppapi::PlatformFileToInt;
using ppapi::thunk::PPB_Broker_API;
namespace ppapi {
namespace proxy {
-namespace {
-
-base::PlatformFile IntToPlatformFile(int32_t handle) {
-#if defined(OS_WIN)
- return reinterpret_cast<HANDLE>(static_cast<intptr_t>(handle));
-#elif defined(OS_POSIX)
- return handle;
-#else
- #error Not implemented.
-#endif
-}
-
-int32_t PlatformFileToInt(base::PlatformFile handle) {
-#if defined(OS_WIN)
- return static_cast<int32_t>(reinterpret_cast<intptr_t>(handle));
-#elif defined(OS_POSIX)
- return handle;
-#else
- #error Not implemented.
-#endif
-}
-
-} // namespace
-
class Broker : public PPB_Broker_API, public Resource {
public:
explicit Broker(const HostResource& resource);
virtual ~Broker();
- // Resource overries.
+ // Resource overrides.
virtual PPB_Broker_API* AsPPB_Broker_API() OVERRIDE;
// PPB_Broker_API implementation.
« no previous file with comments | « ppapi/proxy/ppb_audio_proxy.cc ('k') | ppapi/shared_impl/platform_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698