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

Unified Diff: ppapi/cpp/resource.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/private/var_private.cc ('k') | ppapi/cpp/resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/resource.h
diff --git a/ppapi/cpp/resource.h b/ppapi/cpp/resource.h
index e6bd0749abc95c8ef53e888ff2ae95b5db94b359..f21467214ff6b1852a23a40155339d1cfaa5de8a 100644
--- a/ppapi/cpp/resource.h
+++ b/ppapi/cpp/resource.h
@@ -6,6 +6,8 @@
#define PPAPI_CPP_RESOURCE_H_
#include "ppapi/c/pp_resource.h"
+#include "ppapi/cpp/instance_handle.h"
+#include "ppapi/cpp/pass_ref.h"
/// @file
/// This file defines a <code>Resource</code> type representing data associated
@@ -15,7 +17,6 @@ namespace pp {
/// A reference counted module resource.
class Resource {
public:
-
/// The default constructor.
Resource();
@@ -60,6 +61,10 @@ class Resource {
/// resource.
explicit Resource(PP_Resource resource);
+ /// Constructor used when a <code>PP_Resource</code> already has a ref count
+ /// assigned. Add additional refcount is not taken.
+ Resource(PassRef, PP_Resource resource);
+
/// PassRefFromConstructor is called by derived class' constructors to
/// initialize this <code>Resource</code> with a <code>PP_Resource</code>
/// that has already had its reference count incremented by
« no previous file with comments | « ppapi/cpp/private/var_private.cc ('k') | ppapi/cpp/resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698