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

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: 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
Index: ppapi/shared_impl/resource.h
diff --git a/ppapi/shared_impl/resource.h b/ppapi/shared_impl/resource.h
index 4c5dc358c1f48231955d778a99cb1b1c08bd55ae..bf852d24aaba28b860832fec9fb81977b89b6205 100644
--- a/ppapi/shared_impl/resource.h
+++ b/ppapi/shared_impl/resource.h
@@ -54,6 +54,7 @@
F(PPB_MessageLoop_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) \
@@ -190,8 +191,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

Powered by Google App Engine
This is Rietveld 408576698