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

Side by Side Diff: ppapi/proxy/plugin_resource.h

Issue 5574006: Start deinlining non-empty virtual methods. (This will be automatically checked (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove virtual from VideoFrame::type() Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.cc ('k') | ppapi/proxy/plugin_resource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 return resource ? resource->Cast<T>() : NULL; 43 return resource ? resource->Cast<T>() : NULL;
44 } 44 }
45 45
46 template <typename T> T* Cast() { return NULL; } 46 template <typename T> T* Cast() { return NULL; }
47 47
48 private: 48 private:
49 // Type-specific getters for individual resource types. These will return 49 // Type-specific getters for individual resource types. These will return
50 // NULL if the resource does not match the specified type. Used by the Cast() 50 // NULL if the resource does not match the specified type. Used by the Cast()
51 // function. 51 // function.
52 #define DEFINE_TYPE_GETTER(RESOURCE) \ 52 #define DEFINE_TYPE_GETTER(RESOURCE) \
53 virtual RESOURCE* As##RESOURCE() { return NULL; } 53 virtual RESOURCE* As##RESOURCE();
54 FOR_ALL_RESOURCES(DEFINE_TYPE_GETTER) 54 FOR_ALL_RESOURCES(DEFINE_TYPE_GETTER)
55 #undef DEFINE_TYPE_GETTER 55 #undef DEFINE_TYPE_GETTER
56 56
57 DISALLOW_COPY_AND_ASSIGN(PluginResource); 57 DISALLOW_COPY_AND_ASSIGN(PluginResource);
58 }; 58 };
59 59
60 // Cast() specializations. 60 // Cast() specializations.
61 #define DEFINE_RESOURCE_CAST(Type) \ 61 #define DEFINE_RESOURCE_CAST(Type) \
62 template <> inline Type* PluginResource::Cast<Type>() { \ 62 template <> inline Type* PluginResource::Cast<Type>() { \
63 return As##Type(); \ 63 return As##Type(); \
64 } 64 }
65 FOR_ALL_RESOURCES(DEFINE_RESOURCE_CAST) 65 FOR_ALL_RESOURCES(DEFINE_RESOURCE_CAST)
66 #undef DEFINE_RESOURCE_CAST 66 #undef DEFINE_RESOURCE_CAST
67 67
68 } // namespace proxy 68 } // namespace proxy
69 } // namespace pp 69 } // namespace pp
70 70
71 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_H_ 71 #endif // PPAPI_PROXY_PLUGIN_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.cc ('k') | ppapi/proxy/plugin_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698