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

Unified Diff: ppapi/shared_impl/resource.h

Issue 10790078: PPAPI: Make PPB_MessageLoop_Dev::GetForMainThread work (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: review comments Created 8 years, 4 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/proxy/ppb_message_loop_proxy.cc ('k') | ppapi/shared_impl/resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/resource.h
diff --git a/ppapi/shared_impl/resource.h b/ppapi/shared_impl/resource.h
index 05dc78361cb1294fe5bbd63db03b9c90bf144a7e..01cd61b9f2a51b23c646907407dc72de45cb031d 100644
--- a/ppapi/shared_impl/resource.h
+++ b/ppapi/shared_impl/resource.h
@@ -107,7 +107,7 @@ class PPAPI_SHARED_EXPORT Resource : public base::RefCounted<Resource> {
// lives only in the plugin and doesn't have a corresponding object in the
// host. If you have a host resource ID, use the constructor below which
// takes that HostResource value.
- explicit Resource(ResourceObjectType type, PP_Instance instance);
+ Resource(ResourceObjectType type, PP_Instance instance);
// For constructing given a host resource.
//
@@ -120,8 +120,14 @@ class PPAPI_SHARED_EXPORT Resource : public base::RefCounted<Resource> {
// reason for supporting this constructor at all for the IMPL case is that
// some shared objects use a host resource for both modes to keep things the
// same.
- explicit Resource(ResourceObjectType type,
- const HostResource& host_resource);
+ Resource(ResourceObjectType type, const HostResource& host_resource);
+
+ // Constructor for untracked objects. These have no associated instance. Use
+ // this with care, as the object is likely to persist for the lifetime of the
+ // plugin module. This is appropriate in some rare cases, like the
+ // PPB_MessageLoop resource for the main thread.
+ struct Untracked {};
+ explicit Resource(Untracked);
virtual ~Resource();
« no previous file with comments | « ppapi/proxy/ppb_message_loop_proxy.cc ('k') | ppapi/shared_impl/resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698