summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/cpp')
-rw-r--r--ppapi/cpp/module.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/ppapi/cpp/module.h b/ppapi/cpp/module.h
index 56567f8..99526f0 100644
--- a/ppapi/cpp/module.h
+++ b/ppapi/cpp/module.h
@@ -21,6 +21,8 @@ class Instance;
class Module {
public:
+ typedef std::map<PP_Instance, Instance*> InstanceMap;
+
// You may not call any other PP functions from the constructor, put them
// in Init instead. Various things will not be set up until the constructor
// completes.
@@ -88,6 +90,9 @@ class Module {
bool InternalInit(PP_Module mod,
PPB_GetInterface get_browser_interface);
+ // Allows iteration over the current instances in the module.
+ const InstanceMap& current_instances() const { return current_instances_; }
+
protected:
// Override to create your own plugin type.
virtual Instance* CreateInstance(PP_Instance instance) = 0;
@@ -104,7 +109,6 @@ class Module {
Module& operator=(const Module&);
// Instance tracking.
- typedef std::map<PP_Instance, Instance*> InstanceMap;
InstanceMap current_instances_;
PP_Module pp_module_;