Chromium Code Reviews| Index: ppapi/cpp/instance.h |
| diff --git a/ppapi/cpp/instance.h b/ppapi/cpp/instance.h |
| index 025f3989c80693c6f0ddf6488e7aa00522260d58..36d37a05d7111e870ee7b58f4f0235fd0b65ee92 100644 |
| --- a/ppapi/cpp/instance.h |
| +++ b/ppapi/cpp/instance.h |
| @@ -14,6 +14,7 @@ |
| #include "ppapi/c/pp_instance.h" |
| #include "ppapi/c/pp_resource.h" |
| #include "ppapi/c/pp_stdint.h" |
| +#include "ppapi/cpp/instance_handle.h" |
| #include "ppapi/cpp/view.h" |
| struct PP_InputEvent; |
| @@ -24,6 +25,7 @@ namespace pp { |
| class Graphics2D; |
| class Graphics3D; |
| class InputEvent; |
| +class InstanceHandle; |
| class Rect; |
| class URLLoader; |
| class Var; |
| @@ -60,8 +62,7 @@ class Instance { |
| virtual ~Instance(); |
| /// This function returns the <code>PP_Instance</code> identifying this |
| - /// object. When using the PPAPI C++ wrappers this is not normally necessary, |
| - /// but is required when using the lower-level C APIs. |
| + /// object. |
| /// |
| /// @return A <code>PP_Instance</code> identifying this object. |
| PP_Instance pp_instance() const { return pp_instance_; } |
| @@ -486,7 +487,13 @@ class Instance { |
| /// @param[in] object |
| void AddPerInstanceObject(const std::string& interface_name, void* object); |
| - // {PENDING: summarize Remove method here} |
| + /// Static version of AddPerInstanceObject that takes an InstanceHandle. As with |
|
dmichael (off chromium)
2012/02/21 23:38:02
nit: >80 char
|
| + /// all other instance functions, this must only be called on the main thread. |
| + static void AddPerInstanceObject(const InstanceHandle& instance, |
| + const std::string& interface_name, |
| + void* object); |
| + |
| + /// {PENDING: summarize Remove method here} |
|
dmichael (off chromium)
2012/02/21 23:38:02
nit: jond made that // instead of /// to keep it o
|
| /// |
| /// Refer to AddPerInstanceObject() for further information. |
| /// |
| @@ -495,6 +502,12 @@ class Instance { |
| /// @param[in] object |
| void RemovePerInstanceObject(const std::string& interface_name, void* object); |
| + /// Static version of AddPerInstanceObject that takes an InstanceHandle. As with |
|
dmichael (off chromium)
2012/02/21 23:38:02
>80 char
|
| + /// all other instance functions, this must only be called on the main thread. |
| + static void RemovePerInstanceObject(const InstanceHandle& instance, |
| + const std::string& interface_name, |
| + void* object); |
| + |
| /// Look up an object previously associated with an instance. Returns NULL |
| /// if the instance is invalid or there is no object for the given interface |
| /// name on the instance. |