From c88cbfa32dfc9847277a753ffc464d806fa0a4ee Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Tue, 19 Jul 2011 17:07:24 +0000 Subject: Create a way to iterate over instances in a module in the C++ wrapper. Remove out-of-date TODO comment in ppb_core. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/7395008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93043 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/cpp/module.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ppapi/cpp') 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 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 InstanceMap; InstanceMap current_instances_; PP_Module pp_module_; -- cgit v1.1