| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This is the simplest possible C Pepper plugin that does nothing. If you're | 5 // This is the simplest possible C Pepper plugin that does nothing. If you're |
| 6 // using C++, you will want to look at stub.cc which uses the more convenient | 6 // using C++, you will want to look at stub.cc which uses the more convenient |
| 7 // C++ wrappers. | 7 // C++ wrappers. |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> |
| 10 | 11 |
| 11 #include "ppapi/c/pp_errors.h" | 12 #include "ppapi/c/pp_errors.h" |
| 12 #include "ppapi/c/pp_module.h" | 13 #include "ppapi/c/pp_module.h" |
| 13 #include "ppapi/c/ppb.h" | 14 #include "ppapi/c/ppb.h" |
| 14 #include "ppapi/c/ppp.h" | 15 #include "ppapi/c/ppp.h" |
| 15 | 16 |
| 16 PP_Module g_module_id; | 17 PP_Module g_module_id; |
| 17 PPB_GetInterface g_get_browser_interface = NULL; | 18 PPB_GetInterface g_get_browser_interface = NULL; |
| 18 | 19 |
| 19 PP_EXPORT int32_t PPP_InitializeModule(PP_Module module_id, | 20 PP_EXPORT int32_t PPP_InitializeModule(PP_Module module_id, |
| 20 PPB_GetInterface get_browser_interface) { | 21 PPB_GetInterface get_browser_interface) { |
| 21 // Save the global module information for later. | 22 // Save the global module information for later. |
| 22 g_module_id = module_id; | 23 g_module_id = module_id; |
| 23 g_get_browser_interface = get_browser_interface; | 24 g_get_browser_interface = get_browser_interface; |
| 24 | 25 |
| 25 return PP_OK; | 26 return PP_OK; |
| 26 } | 27 } |
| 27 | 28 |
| 28 PP_EXPORT void PPP_ShutdownModule() { | 29 PP_EXPORT void PPP_ShutdownModule() { |
| 29 } | 30 } |
| 30 | 31 |
| 31 PP_EXPORT const void* PPP_GetInterface(const char* interface_name) { | 32 PP_EXPORT const void* PPP_GetInterface(const char* interface_name) { |
| 32 // You will normally implement a getter for at least PPP_INSTANCE_INTERFACE | 33 // You will normally implement a getter for at least PPP_INSTANCE_INTERFACE |
| 33 // here. | 34 // here. |
| 34 return NULL; | 35 return NULL; |
| 35 } | 36 } |
| OLD | NEW |