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

Unified Diff: ppapi/shared_impl/resource.h

Issue 16819002: PPAPI: Introduce PPB_NetworkProxy_Dev (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 6 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_instance_proxy.cc ('k') | ppapi/shared_impl/singleton_resource_id.h » ('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 eac6c95f07f8e38a8b12dcf2f3a3a534a5d8d2e7..3fb09315c7d96c4571ee59bdebf63052138655b4 100644
--- a/ppapi/shared_impl/resource.h
+++ b/ppapi/shared_impl/resource.h
@@ -56,6 +56,7 @@
F(PPB_NetAddress_API) \
F(PPB_NetworkList_API) \
F(PPB_NetworkMonitor_Private_API) \
+ F(PPB_NetworkProxy_API) \
F(PPB_PDF_API) \
F(PPB_Printing_API) \
F(PPB_ResourceArray_API) \
@@ -194,8 +195,11 @@ class PPAPI_SHARED_EXPORT Resource : public base::RefCounted<Resource> {
FOR_ALL_PPAPI_RESOURCE_APIS(DEFINE_TYPE_GETTER)
#undef DEFINE_TYPE_GETTER
- // Template-based dynamic casting. See specializations below.
- template <typename T> T* GetAs() { return NULL; }
+ // Template-based dynamic casting. See specializations below. This is
+ // unimplemented for the default case. This way, for anything that's not a
+ // resource (or if a developer forgets to add the resource to the list in
+ // this file), the result is a linker error.
+ template <typename T> T* GetAs();
// Called when a PpapiPluginMsg_ResourceReply reply is received for a
// previous CallRenderer. The message is the nested reply message, which may
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.cc ('k') | ppapi/shared_impl/singleton_resource_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698