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

Unified Diff: webkit/glue/plugins/pepper_resource_tracker.cc

Issue 2800028: Simplfy Pepepr2 bolierplate code. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Updated. Created 10 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: webkit/glue/plugins/pepper_resource_tracker.cc
diff --git a/webkit/glue/plugins/pepper_resource_tracker.cc b/webkit/glue/plugins/pepper_resource_tracker.cc
index 077c95b404ce97114068382a0346de070b4cb075..c8779e4319b64949e427de3c19348c5946aa0334 100644
--- a/webkit/glue/plugins/pepper_resource_tracker.cc
+++ b/webkit/glue/plugins/pepper_resource_tracker.cc
@@ -57,24 +57,4 @@ void ResourceTracker::DeleteResource(Resource* resource) {
live_resources_.erase(found);
}
-#define GET_AS_TYPE_IMPL(Type) \
- scoped_refptr<Type> ResourceTracker::GetAs##Type( \
- PP_Resource res) const { \
- scoped_refptr<Resource> resource = GetResource(res); \
- if (!resource.get()) \
- return scoped_refptr<Type>(); \
- return scoped_refptr<Type>(resource->As##Type()); \
- }
-
-GET_AS_TYPE_IMPL(Buffer)
-GET_AS_TYPE_IMPL(DeviceContext2D)
-GET_AS_TYPE_IMPL(DirectoryReader)
-GET_AS_TYPE_IMPL(FileChooser)
-GET_AS_TYPE_IMPL(FileIO)
-GET_AS_TYPE_IMPL(FileRef)
-GET_AS_TYPE_IMPL(ImageData)
-GET_AS_TYPE_IMPL(URLLoader)
-GET_AS_TYPE_IMPL(URLRequestInfo)
-GET_AS_TYPE_IMPL(URLResponseInfo)
-
} // namespace pepper

Powered by Google App Engine
This is Rietveld 408576698