OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 /// GetPluginInterface() implements <code>GetInterface</code> for the browser | 76 /// GetPluginInterface() implements <code>GetInterface</code> for the browser |
77 /// to get module interfaces. If you need to provide your own implementations | 77 /// to get module interfaces. If you need to provide your own implementations |
78 /// of new interfaces, use AddPluginInterface() which this function will use. | 78 /// of new interfaces, use AddPluginInterface() which this function will use. |
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 module 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. This should only | 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 | 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 | 91 /// any time on the main thread, so using it on other threads may cause a |
92 /// crash. | 92 /// crash. |
93 /// | 93 /// |
94 /// @param[in] instance This <code>PP_Instance</code>. | 94 /// @param[in] instance This <code>PP_Instance</code>. |
95 /// | 95 /// |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 // All additional interfaces this plugin can handle as registered by | 165 // All additional interfaces this plugin can handle as registered by |
166 // AddPluginInterface. | 166 // AddPluginInterface. |
167 typedef std::map<std::string, const void*> InterfaceMap; | 167 typedef std::map<std::string, const void*> InterfaceMap; |
168 InterfaceMap additional_interfaces_; | 168 InterfaceMap additional_interfaces_; |
169 }; | 169 }; |
170 | 170 |
171 } // namespace pp | 171 } // namespace pp |
172 | 172 |
173 #endif // PPAPI_CPP_MODULE_H_ | 173 #endif // PPAPI_CPP_MODULE_H_ |
OLD | NEW |