| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_PROXY_PLUGIN_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_PLUGIN_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_PLUGIN_RESOURCE_H_ | 6 #define PPAPI_PROXY_PLUGIN_RESOURCE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "ppapi/proxy/plugin_dispatcher.h" | 9 #include "ppapi/proxy/plugin_dispatcher.h" |
| 10 #include "ppapi/proxy/plugin_resource_tracker.h" | 10 #include "ppapi/proxy/plugin_resource_tracker.h" |
| 11 | 11 |
| 12 // If you inherit from resource, make sure you add the class name here. | 12 // If you inherit from resource, make sure you add the class name here. |
| 13 #define FOR_ALL_RESOURCES(F) \ | 13 #define FOR_ALL_RESOURCES(F) \ |
| 14 F(Buffer) \ |
| 14 F(Font) \ | 15 F(Font) \ |
| 15 F(Graphics2D) \ | 16 F(Graphics2D) \ |
| 16 F(ImageData) \ | 17 F(ImageData) \ |
| 18 F(PrivateFontFile) \ |
| 17 F(URLLoader) \ | 19 F(URLLoader) \ |
| 18 F(URLRequestInfo)\ | 20 F(URLRequestInfo)\ |
| 19 F(URLResponseInfo) | 21 F(URLResponseInfo) |
| 20 | 22 |
| 21 namespace pp { | 23 namespace pp { |
| 22 namespace proxy { | 24 namespace proxy { |
| 23 | 25 |
| 24 // Forward declaration of Resource classes. | 26 // Forward declaration of Resource classes. |
| 25 #define DECLARE_RESOURCE_CLASS(RESOURCE) class RESOURCE; | 27 #define DECLARE_RESOURCE_CLASS(RESOURCE) class RESOURCE; |
| 26 FOR_ALL_RESOURCES(DECLARE_RESOURCE_CLASS) | 28 FOR_ALL_RESOURCES(DECLARE_RESOURCE_CLASS) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 template <> inline Type* PluginResource::Cast<Type>() { \ | 60 template <> inline Type* PluginResource::Cast<Type>() { \ |
| 59 return As##Type(); \ | 61 return As##Type(); \ |
| 60 } | 62 } |
| 61 FOR_ALL_RESOURCES(DEFINE_RESOURCE_CAST) | 63 FOR_ALL_RESOURCES(DEFINE_RESOURCE_CAST) |
| 62 #undef DEFINE_RESOURCE_CAST | 64 #undef DEFINE_RESOURCE_CAST |
| 63 | 65 |
| 64 } // namespace proxy | 66 } // namespace proxy |
| 65 } // namespace pp | 67 } // namespace pp |
| 66 | 68 |
| 67 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_H_ | 69 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_H_ |
| OLD | NEW |