Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: ppapi/cpp/instance.h

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/input_event.cc ('k') | ppapi/cpp/instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/instance.h
diff --git a/ppapi/cpp/instance.h b/ppapi/cpp/instance.h
index 025f3989c80693c6f0ddf6488e7aa00522260d58..f891bed628dc28fe734785ac23348cea001ad0c5 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,6 +487,13 @@ class Instance {
/// @param[in] object
void AddPerInstanceObject(const std::string& interface_name, void* object);
+ /// Static version of AddPerInstanceObject that takes an InstanceHandle. As
+ /// with 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}
///
/// Refer to AddPerInstanceObject() for further information.
@@ -495,6 +503,13 @@ class Instance {
/// @param[in] object
void RemovePerInstanceObject(const std::string& interface_name, void* object);
+ /// Static version of AddPerInstanceObject that takes an InstanceHandle. As
+ /// with 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.
« no previous file with comments | « ppapi/cpp/input_event.cc ('k') | ppapi/cpp/instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698