diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-19 17:07:24 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-19 17:07:24 +0000 |
commit | c88cbfa32dfc9847277a753ffc464d806fa0a4ee (patch) | |
tree | 6027a3bba9cbb8f7c4508b440ab191aabf6a8015 /ppapi | |
parent | afd52c01244eb19191edb615cd72136a95fef308 (diff) | |
download | chromium_src-c88cbfa32dfc9847277a753ffc464d806fa0a4ee.zip chromium_src-c88cbfa32dfc9847277a753ffc464d806fa0a4ee.tar.gz chromium_src-c88cbfa32dfc9847277a753ffc464d806fa0a4ee.tar.bz2 |
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
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/cpp/module.h | 6 |
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_; |