Index: native_client_sdk/src/libraries/nacl_mounts/real_pepper_interface.cc |
diff --git a/native_client_sdk/src/libraries/nacl_mounts/real_pepper_interface.cc b/native_client_sdk/src/libraries/nacl_mounts/real_pepper_interface.cc |
deleted file mode 100644 |
index 22d9ea8dc699cde7c0192d2f8e4e19f683e44bbf..0000000000000000000000000000000000000000 |
--- a/native_client_sdk/src/libraries/nacl_mounts/real_pepper_interface.cc |
+++ /dev/null |
@@ -1,134 +0,0 @@ |
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
- * Use of this source code is governed by a BSD-style license that can be |
- * found in the LICENSE file. |
- */ |
- |
-#include "nacl_mounts/real_pepper_interface.h" |
-#include <assert.h> |
-#include <stdio.h> |
- |
-#include <ppapi/c/pp_errors.h> |
- |
- |
-#include "nacl_mounts/pepper/undef_macros.h" |
-#define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
- class Real##BaseClass : public BaseClass { \ |
- public: \ |
- explicit Real##BaseClass(const PPInterface* interface); |
-#define END_INTERFACE(BaseClass, PPInterface) \ |
- private: \ |
- const PPInterface* interface_; \ |
- }; |
-#define METHOD1(Class, ReturnType, MethodName, Type0) \ |
- virtual ReturnType MethodName(Type0); |
-#define METHOD2(Class, ReturnType, MethodName, Type0, Type1) \ |
- virtual ReturnType MethodName(Type0, Type1); |
-#define METHOD3(Class, ReturnType, MethodName, Type0, Type1, Type2) \ |
- virtual ReturnType MethodName(Type0, Type1, Type2); |
-#define METHOD4(Class, ReturnType, MethodName, Type0, Type1, Type2, Type3) \ |
- virtual ReturnType MethodName(Type0, Type1, Type2, Type3); |
-#define METHOD5(Class, ReturnType, MethodName, Type0, Type1, Type2, Type3, \ |
- Type4) \ |
- virtual ReturnType MethodName(Type0, Type1, Type2, Type3, Type4); |
-#include "nacl_mounts/pepper/all_interfaces.h" |
- |
- |
-#include "nacl_mounts/pepper/undef_macros.h" |
-#define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
- Real##BaseClass::Real##BaseClass(const PPInterface* interface) \ |
- : interface_(interface) {} |
- |
-#define END_INTERFACE(BaseClass, PPInterface) |
- |
-#define METHOD1(BaseClass, ReturnType, MethodName, Type0) \ |
- ReturnType Real##BaseClass::MethodName(Type0 arg0) { \ |
- return interface_->MethodName(arg0); \ |
- } |
-#define METHOD2(BaseClass, ReturnType, MethodName, Type0, Type1) \ |
- ReturnType Real##BaseClass::MethodName(Type0 arg0, Type1 arg1) { \ |
- return interface_->MethodName(arg0, arg1); \ |
- } |
-#define METHOD3(BaseClass, ReturnType, MethodName, Type0, Type1, Type2) \ |
- ReturnType Real##BaseClass::MethodName(Type0 arg0, Type1 arg1, \ |
- Type2 arg2) { \ |
- return interface_->MethodName(arg0, arg1, arg2); \ |
- } |
-#define METHOD4(BaseClass, ReturnType, MethodName, Type0, Type1, Type2, Type3) \ |
- ReturnType Real##BaseClass::MethodName(Type0 arg0, Type1 arg1, Type2 arg2, \ |
- Type3 arg3) { \ |
- return interface_->MethodName(arg0, arg1, arg2, arg3); \ |
- } |
-#define METHOD5(BaseClass, ReturnType, MethodName, Type0, Type1, Type2, Type3, \ |
- Type4) \ |
- ReturnType Real##BaseClass::MethodName(Type0 arg0, Type1 arg1, Type2 arg2, \ |
- Type3 arg3, Type4 arg4) { \ |
- return interface_->MethodName(arg0, arg1, arg2, arg3, arg4); \ |
- } |
-#include "nacl_mounts/pepper/all_interfaces.h" |
- |
- |
-RealPepperInterface::RealPepperInterface(PP_Instance instance, |
- PPB_GetInterface get_browser_interface) |
- : instance_(instance), |
- core_interface_(NULL), |
- message_loop_interface_(NULL) { |
- |
- core_interface_ = static_cast<const PPB_Core*>( |
- get_browser_interface(PPB_CORE_INTERFACE)); |
- message_loop_interface_ = static_cast<const PPB_MessageLoop*>( |
- get_browser_interface(PPB_MESSAGELOOP_INTERFACE)); |
- assert(core_interface_); |
- assert(message_loop_interface_); |
- |
-#include "nacl_mounts/pepper/undef_macros.h" |
-#include "nacl_mounts/pepper/define_empty_macros.h" |
-#undef BEGIN_INTERFACE |
-#define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
- BaseClass##interface_ = new Real##BaseClass( \ |
- static_cast<const PPInterface*>( \ |
- get_browser_interface(InterfaceString))); |
-#include "nacl_mounts/pepper/all_interfaces.h" |
-} |
- |
-PP_Instance RealPepperInterface::GetInstance() { |
- return instance_; |
-} |
- |
-void RealPepperInterface::AddRefResource(PP_Resource resource) { |
- if (resource) |
- core_interface_->AddRefResource(resource); |
-} |
- |
-void RealPepperInterface::ReleaseResource(PP_Resource resource) { |
- if (resource) |
- core_interface_->ReleaseResource(resource); |
-} |
- |
-// Define getter function. |
-#include "nacl_mounts/pepper/undef_macros.h" |
-#include "nacl_mounts/pepper/define_empty_macros.h" |
-#undef BEGIN_INTERFACE |
-#define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
- BaseClass* RealPepperInterface::Get##BaseClass() { \ |
- return BaseClass##interface_; \ |
- } |
-#include "nacl_mounts/pepper/all_interfaces.h" |
- |
- |
-int32_t RealPepperInterface::InitializeMessageLoop() { |
- int32_t result; |
- PP_Resource message_loop = 0; |
- if (core_interface_->IsMainThread()) { |
- // TODO(binji): Spin up the main thread's ppapi work thread. |
- assert(0); |
- } else { |
- message_loop = message_loop_interface_->GetCurrent(); |
- if (!message_loop) { |
- message_loop = message_loop_interface_->Create(instance_); |
- result = message_loop_interface_->AttachToCurrentThread(message_loop); |
- assert(result == PP_OK); |
- } |
- } |
- |
- return PP_OK; |
-} |