| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
| 10 #include "ppapi/proxy/host_resource.h" | 10 #include "ppapi/proxy/host_resource.h" |
| 11 #include "ppapi/proxy/plugin_dispatcher.h" | 11 #include "ppapi/proxy/plugin_dispatcher.h" |
| 12 #include "ppapi/proxy/plugin_resource_tracker.h" | 12 #include "ppapi/proxy/plugin_resource_tracker.h" |
| 13 | 13 |
| 14 // If you inherit from resource, make sure you add the class name here. | 14 // If you inherit from resource, make sure you add the class name here. |
| 15 #define FOR_ALL_PLUGIN_RESOURCES(F) \ | 15 #define FOR_ALL_PLUGIN_RESOURCES(F) \ |
| 16 F(Audio) \ | 16 F(Audio) \ |
| 17 F(AudioConfig) \ | 17 F(AudioConfig) \ |
| 18 F(Buffer) \ | 18 F(Buffer) \ |
| 19 F(Context3D) \ |
| 19 F(Font) \ | 20 F(Font) \ |
| 20 F(Graphics2D) \ | 21 F(Graphics2D) \ |
| 21 F(ImageData) \ | 22 F(ImageData) \ |
| 22 F(MockResource) \ | 23 F(MockResource) \ |
| 23 F(PrivateFontFile) \ | 24 F(PrivateFontFile) \ |
| 25 F(Surface3D) \ |
| 24 F(URLLoader) \ | 26 F(URLLoader) \ |
| 25 F(URLRequestInfo)\ | 27 F(URLRequestInfo)\ |
| 26 F(URLResponseInfo) | 28 F(URLResponseInfo) |
| 27 | 29 |
| 28 namespace pp { | 30 namespace pp { |
| 29 namespace proxy { | 31 namespace proxy { |
| 30 | 32 |
| 31 // Forward declaration of Resource classes. | 33 // Forward declaration of Resource classes. |
| 32 #define DECLARE_RESOURCE_CLASS(RESOURCE) class RESOURCE; | 34 #define DECLARE_RESOURCE_CLASS(RESOURCE) class RESOURCE; |
| 33 FOR_ALL_PLUGIN_RESOURCES(DECLARE_RESOURCE_CLASS) | 35 FOR_ALL_PLUGIN_RESOURCES(DECLARE_RESOURCE_CLASS) |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 template <> inline Type* PluginResource::Cast<Type>() { \ | 79 template <> inline Type* PluginResource::Cast<Type>() { \ |
| 78 return As##Type(); \ | 80 return As##Type(); \ |
| 79 } | 81 } |
| 80 FOR_ALL_PLUGIN_RESOURCES(DEFINE_RESOURCE_CAST) | 82 FOR_ALL_PLUGIN_RESOURCES(DEFINE_RESOURCE_CAST) |
| 81 #undef DEFINE_RESOURCE_CAST | 83 #undef DEFINE_RESOURCE_CAST |
| 82 | 84 |
| 83 } // namespace proxy | 85 } // namespace proxy |
| 84 } // namespace pp | 86 } // namespace pp |
| 85 | 87 |
| 86 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_H_ | 88 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_H_ |
| OLD | NEW |