| OLD | NEW |
| 1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2013 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_PEPPER_INTERFACE_DELEGATE_H_ | 5 #ifndef LIBRARIES_NACL_IO_PEPPER_INTERFACE_DELEGATE_H_ |
| 6 #define LIBRARIES_NACL_IO_PEPPER_INTERFACE_DELEGATE_H_ | 6 #define LIBRARIES_NACL_IO_PEPPER_INTERFACE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "nacl_io/pepper_interface.h" | 8 #include "nacl_io/pepper_interface.h" |
| 9 | 9 |
| 10 // This class allows you to delegate Interface requests to different | 10 // This class allows you to delegate Interface requests to different |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Interface getters. | 43 // Interface getters. |
| 44 // | 44 // |
| 45 // These declarations look like: | 45 // These declarations look like: |
| 46 // | 46 // |
| 47 // CoreInterface* GetCoreInterface(); | 47 // CoreInterface* GetCoreInterface(); |
| 48 // | 48 // |
| 49 #include "nacl_io/pepper/undef_macros.h" | 49 #include "nacl_io/pepper/undef_macros.h" |
| 50 #include "nacl_io/pepper/define_empty_macros.h" | 50 #include "nacl_io/pepper/define_empty_macros.h" |
| 51 #undef BEGIN_INTERFACE | 51 #undef BEGIN_INTERFACE |
| 52 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ | 52 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
| 53 virtual BaseClass* Get##BaseClass(); | 53 virtual BaseClass* Get##BaseClass(); |
| 54 #include "nacl_io/pepper/all_interfaces.h" | 54 #include "nacl_io/pepper/all_interfaces.h" |
| 55 | 55 |
| 56 // Interface delegate setters. | 56 // Interface delegate setters. |
| 57 // | 57 // |
| 58 // These declarations look like: | 58 // These declarations look like: |
| 59 // | 59 // |
| 60 // void SetCoreInterface(CoreInterface* delegate); | 60 // void SetCoreInterface(CoreInterface* delegate); |
| 61 // | 61 // |
| 62 #include "nacl_io/pepper/undef_macros.h" | 62 #include "nacl_io/pepper/undef_macros.h" |
| 63 #include "nacl_io/pepper/define_empty_macros.h" | 63 #include "nacl_io/pepper/define_empty_macros.h" |
| 64 #undef BEGIN_INTERFACE | 64 #undef BEGIN_INTERFACE |
| 65 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ | 65 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
| 66 void Set##BaseClass##Delegate(BaseClass* delegate); | 66 void Set##BaseClass##Delegate(BaseClass* delegate); |
| 67 #include "nacl_io/pepper/all_interfaces.h" | 67 #include "nacl_io/pepper/all_interfaces.h" |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 PP_Instance instance_; | 70 PP_Instance instance_; |
| 71 // Interface delegate pointers. | 71 // Interface delegate pointers. |
| 72 #include "nacl_io/pepper/undef_macros.h" | 72 #include "nacl_io/pepper/undef_macros.h" |
| 73 #include "nacl_io/pepper/define_empty_macros.h" | 73 #include "nacl_io/pepper/define_empty_macros.h" |
| 74 #undef BEGIN_INTERFACE | 74 #undef BEGIN_INTERFACE |
| 75 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ | 75 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
| 76 BaseClass* BaseClass##delegate_; | 76 BaseClass* BaseClass##delegate_; |
| 77 #include "nacl_io/pepper/all_interfaces.h" | 77 #include "nacl_io/pepper/all_interfaces.h" |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace nacl_io | 80 } // namespace nacl_io |
| 81 | 81 |
| 82 #endif // LIBRARIES_NACL_IO_PEPPER_INTERFACE_DELEGATE_H_ | 82 #endif // LIBRARIES_NACL_IO_PEPPER_INTERFACE_DELEGATE_H_ |
| OLD | NEW |