| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 #ifndef LIBRARIES_NACL_IO_REAL_PEPPER_INTERFACE_H_ | 5 #ifndef LIBRARIES_NACL_IO_REAL_PEPPER_INTERFACE_H_ |
| 6 #define LIBRARIES_NACL_IO_REAL_PEPPER_INTERFACE_H_ | 6 #define LIBRARIES_NACL_IO_REAL_PEPPER_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <ppapi/c/ppb.h> | 8 #include <ppapi/c/ppb.h> |
| 9 #include <ppapi/c/ppb_core.h> | 9 #include <ppapi/c/ppb_core.h> |
| 10 #include <ppapi/c/ppb_message_loop.h> | 10 #include <ppapi/c/ppb_message_loop.h> |
| 11 #include "pepper_interface.h" | 11 #include "pepper_interface.h" |
| 12 | 12 |
| 13 // Forward declare interface classes. | 13 // Forward declare interface classes. |
| 14 #include "nacl_io/pepper/undef_macros.h" |
| 14 #include "nacl_io/pepper/define_empty_macros.h" | 15 #include "nacl_io/pepper/define_empty_macros.h" |
| 15 #undef BEGIN_INTERFACE | 16 #undef BEGIN_INTERFACE |
| 16 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ | 17 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
| 17 class Real##BaseClass; | 18 class Real##BaseClass; |
| 18 #include "nacl_io/pepper/all_interfaces.h" | 19 #include "nacl_io/pepper/all_interfaces.h" |
| 19 #include "nacl_io/pepper/undef_macros.h" | |
| 20 | 20 |
| 21 class RealPepperInterface : public PepperInterface { | 21 class RealPepperInterface : public PepperInterface { |
| 22 public: | 22 public: |
| 23 RealPepperInterface(PP_Instance instance, | 23 RealPepperInterface(PP_Instance instance, |
| 24 PPB_GetInterface get_browser_interface); | 24 PPB_GetInterface get_browser_interface); |
| 25 | 25 |
| 26 virtual PP_Instance GetInstance(); | 26 virtual PP_Instance GetInstance(); |
| 27 virtual void AddRefResource(PP_Resource); | 27 virtual void AddRefResource(PP_Resource); |
| 28 virtual void ReleaseResource(PP_Resource); | 28 virtual void ReleaseResource(PP_Resource); |
| 29 | 29 |
| 30 // Interface getters. | 30 // Interface getters. |
| 31 #include "nacl_io/pepper/undef_macros.h" |
| 31 #include "nacl_io/pepper/define_empty_macros.h" | 32 #include "nacl_io/pepper/define_empty_macros.h" |
| 32 #undef BEGIN_INTERFACE | 33 #undef BEGIN_INTERFACE |
| 33 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ | 34 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
| 34 virtual BaseClass* Get##BaseClass(); | 35 virtual BaseClass* Get##BaseClass(); |
| 35 #include "nacl_io/pepper/all_interfaces.h" | 36 #include "nacl_io/pepper/all_interfaces.h" |
| 36 #include "nacl_io/pepper/undef_macros.h" | |
| 37 | 37 |
| 38 int32_t InitializeMessageLoop(); | 38 int32_t InitializeMessageLoop(); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 PP_Instance instance_; | 41 PP_Instance instance_; |
| 42 const PPB_Core* core_interface_; | 42 const PPB_Core* core_interface_; |
| 43 const PPB_MessageLoop* message_loop_interface_; | 43 const PPB_MessageLoop* message_loop_interface_; |
| 44 | 44 |
| 45 // Interface pointers. | 45 // Interface pointers. |
| 46 #include "nacl_io/pepper/undef_macros.h" |
| 46 #include "nacl_io/pepper/define_empty_macros.h" | 47 #include "nacl_io/pepper/define_empty_macros.h" |
| 47 #undef BEGIN_INTERFACE | 48 #undef BEGIN_INTERFACE |
| 48 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ | 49 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
| 49 Real##BaseClass* BaseClass##interface_; | 50 Real##BaseClass* BaseClass##interface_; |
| 50 #include "nacl_io/pepper/all_interfaces.h" | 51 #include "nacl_io/pepper/all_interfaces.h" |
| 51 #include "nacl_io/pepper/undef_macros.h" | |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 #endif // LIBRARIES_NACL_IO_REAL_PEPPER_INTERFACE_H_ | 54 #endif // LIBRARIES_NACL_IO_REAL_PEPPER_INTERFACE_H_ |
| OLD | NEW |