| 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 #ifndef PPAPI_CPP_MODULE_H_ | 5 #ifndef PPAPI_CPP_MODULE_H_ |
| 6 #define PPAPI_CPP_MODULE_H_ | 6 #define PPAPI_CPP_MODULE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 Module(); | 28 Module(); |
| 29 virtual ~Module(); | 29 virtual ~Module(); |
| 30 | 30 |
| 31 // Returns the global instance of this module object, or NULL if the module | 31 // Returns the global instance of this module object, or NULL if the module |
| 32 // is not initialized yet. | 32 // is not initialized yet. |
| 33 static Module* Get(); | 33 static Module* Get(); |
| 34 | 34 |
| 35 // This function will be automatically called after the object is created. | 35 // This function will be automatically called after the object is created. |
| 36 // This is where you can put functions that rely on other parts of the API, | 36 // This is where you can put functions that rely on other parts of the API, |
| 37 // now that the module has been created. | 37 // now that the module has been created. |
| 38 virtual bool Init() { return true; } | 38 virtual bool Init(); |
| 39 | 39 |
| 40 // Returns the internal module handle. | 40 // Returns the internal module handle. |
| 41 PP_Module pp_module() const { return pp_module_; } | 41 PP_Module pp_module() const { return pp_module_; } |
| 42 | 42 |
| 43 // Returns the internal get_browser_interface pointer. | 43 // Returns the internal get_browser_interface pointer. |
| 44 // TODO(sehr): This should be removed once the NaCl browser plugin no longer | 44 // TODO(sehr): This should be removed once the NaCl browser plugin no longer |
| 45 // needs it. | 45 // needs it. |
| 46 PPB_GetInterface get_browser_interface() const { | 46 PPB_GetInterface get_browser_interface() const { |
| 47 return get_browser_interface_; | 47 return get_browser_interface_; |
| 48 } | 48 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 // All additional interfaces this plugin can handle as registered by | 116 // All additional interfaces this plugin can handle as registered by |
| 117 // AddPluginInterface. | 117 // AddPluginInterface. |
| 118 typedef std::map<std::string, const void*> InterfaceMap; | 118 typedef std::map<std::string, const void*> InterfaceMap; |
| 119 InterfaceMap additional_interfaces_; | 119 InterfaceMap additional_interfaces_; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace pp | 122 } // namespace pp |
| 123 | 123 |
| 124 #endif // PPAPI_CPP_MODULE_H_ | 124 #endif // PPAPI_CPP_MODULE_H_ |
| OLD | NEW |