| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 /// | 79 /// |
| 80 /// @param[in] interface_name The module interface for the browser to get. | 80 /// @param[in] interface_name The module interface for the browser to get. |
| 81 const void* GetPluginInterface(const char* interface_name); | 81 const void* GetPluginInterface(const char* interface_name); |
| 82 | 82 |
| 83 /// GetBrowserInterface() returns interfaces which the browser implements | 83 /// GetBrowserInterface() returns interfaces which the browser implements |
| 84 /// (i.e. PPB interfaces). | 84 /// (i.e. PPB interfaces). |
| 85 /// @param[in] interface_name The browser interface for the moduel to get. | 85 /// @param[in] interface_name The browser interface for the moduel to get. |
| 86 const void* GetBrowserInterface(const char* interface_name); | 86 const void* GetBrowserInterface(const char* interface_name); |
| 87 | 87 |
| 88 /// InstanceForPPInstance() returns the object associated with this | 88 /// InstanceForPPInstance() returns the object associated with this |
| 89 /// <code>PP_Instance</code>, or NULL if one is not found. | 89 /// <code>PP_Instance</code>, or NULL if one is not found. This should only |
| 90 /// be called from the main thread! This instance object may be destroyed at |
| 91 /// any time on the main thread, so using it on other threads may cause a |
| 92 /// crash. |
| 90 /// | 93 /// |
| 91 /// @param[in] instance This <code>PP_Instance</code>. | 94 /// @param[in] instance This <code>PP_Instance</code>. |
| 92 /// | 95 /// |
| 93 /// @return The object associated with this <code>PP_Instance</code>, | 96 /// @return The object associated with this <code>PP_Instance</code>, |
| 94 /// or NULL if one is not found. | 97 /// or NULL if one is not found. |
| 95 Instance* InstanceForPPInstance(PP_Instance instance); | 98 Instance* InstanceForPPInstance(PP_Instance instance); |
| 96 | 99 |
| 97 /// AddPluginInterface() adds a handler for a provided interface name. When | 100 /// AddPluginInterface() adds a handler for a provided interface name. When |
| 98 /// the browser requests that interface name, the provided | 101 /// the browser requests that interface name, the provided |
| 99 /// <code>vtable</code> will be returned. | 102 /// <code>vtable</code> will be returned. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 165 |
| 163 // All additional interfaces this plugin can handle as registered by | 166 // All additional interfaces this plugin can handle as registered by |
| 164 // AddPluginInterface. | 167 // AddPluginInterface. |
| 165 typedef std::map<std::string, const void*> InterfaceMap; | 168 typedef std::map<std::string, const void*> InterfaceMap; |
| 166 InterfaceMap additional_interfaces_; | 169 InterfaceMap additional_interfaces_; |
| 167 }; | 170 }; |
| 168 | 171 |
| 169 } // namespace pp | 172 } // namespace pp |
| 170 | 173 |
| 171 #endif // PPAPI_CPP_MODULE_H_ | 174 #endif // PPAPI_CPP_MODULE_H_ |
| OLD | NEW |