Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / native_client_sdk / src / libraries / nacl_io / real_pepper_interface.h
blobd2c8a2f84efcf29b785526e13c85e220a3790d48
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
3 // found in the LICENSE file.
5 #ifndef LIBRARIES_NACL_IO_REAL_PEPPER_INTERFACE_H_
6 #define LIBRARIES_NACL_IO_REAL_PEPPER_INTERFACE_H_
8 #include <ppapi/c/ppb.h>
9 #include <ppapi/c/ppb_core.h>
10 #include <ppapi/c/ppb_message_loop.h>
11 #include "pepper_interface.h"
13 namespace nacl_io {
15 // Forward declare interface classes.
16 #include "nacl_io/pepper/undef_macros.h"
17 #include "nacl_io/pepper/define_empty_macros.h"
18 #undef BEGIN_INTERFACE
19 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \
20 class Real##BaseClass;
21 #include "nacl_io/pepper/all_interfaces.h"
23 class RealPepperInterface : public PepperInterface {
24 public:
25 RealPepperInterface(PP_Instance instance,
26 PPB_GetInterface get_browser_interface);
28 virtual PP_Instance GetInstance();
30 // Interface getters.
31 #include "nacl_io/pepper/undef_macros.h"
32 #include "nacl_io/pepper/define_empty_macros.h"
33 #undef BEGIN_INTERFACE
34 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \
35 virtual BaseClass* Get##BaseClass();
36 #include "nacl_io/pepper/all_interfaces.h"
38 private:
39 PP_Instance instance_;
41 // Interface pointers.
42 #include "nacl_io/pepper/undef_macros.h"
43 #include "nacl_io/pepper/define_empty_macros.h"
44 #undef BEGIN_INTERFACE
45 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \
46 Real##BaseClass* BaseClass##interface_;
47 #include "nacl_io/pepper/all_interfaces.h"
50 } // namespace nacl_io
52 #endif // LIBRARIES_NACL_IO_REAL_PEPPER_INTERFACE_H_