OLD | NEW |
1 // Copyright (c) 2010 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 |
11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
12 #include "ppapi/c/pp_module.h" | 12 #include "ppapi/c/pp_module.h" |
13 #include "ppapi/c/pp_stdint.h" | 13 #include "ppapi/c/pp_stdint.h" |
14 #include "ppapi/c/ppb.h" | 14 #include "ppapi/c/ppb.h" |
15 #include "ppapi/c/ppb_core.h" | 15 #include "ppapi/c/ppb_core.h" |
16 #include "ppapi/cpp/core.h" | 16 #include "ppapi/cpp/core.h" |
17 | 17 |
| 18 |
| 19 /// @file |
| 20 /// This file defines a Module class. |
18 namespace pp { | 21 namespace pp { |
19 | 22 |
20 class Instance; | 23 class Instance; |
21 | 24 |
| 25 /// The Module class. The browser calls CreateInstance() to create |
| 26 /// an instance of your module on the web page. The browser creates a new |
| 27 /// instance for each <code>\<embed></code> tag with |
| 28 /// <code>type="application/x-nacl"</code> |
22 class Module { | 29 class Module { |
23 public: | 30 public: |
24 typedef std::map<PP_Instance, Instance*> InstanceMap; | 31 typedef std::map<PP_Instance, Instance*> InstanceMap; |
25 | 32 |
26 // You may not call any other PP functions from the constructor, put them | 33 // You may not call any other PP functions from the constructor, put them |
27 // in Init instead. Various things will not be set up until the constructor | 34 // in Init instead. Various things will not be set up until the constructor |
28 // completes. | 35 // completes. |
29 Module(); | 36 Module(); |
30 virtual ~Module(); | 37 virtual ~Module(); |
31 | 38 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 125 |
119 // All additional interfaces this plugin can handle as registered by | 126 // All additional interfaces this plugin can handle as registered by |
120 // AddPluginInterface. | 127 // AddPluginInterface. |
121 typedef std::map<std::string, const void*> InterfaceMap; | 128 typedef std::map<std::string, const void*> InterfaceMap; |
122 InterfaceMap additional_interfaces_; | 129 InterfaceMap additional_interfaces_; |
123 }; | 130 }; |
124 | 131 |
125 } // namespace pp | 132 } // namespace pp |
126 | 133 |
127 #endif // PPAPI_CPP_MODULE_H_ | 134 #endif // PPAPI_CPP_MODULE_H_ |
OLD | NEW |