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 #include "webkit/glue/plugins/pepper_resource.h" | 5 #include "webkit/glue/plugins/pepper_resource.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "webkit/glue/plugins/pepper_resource_tracker.h" | 8 #include "webkit/glue/plugins/pepper_resource_tracker.h" |
9 | 9 |
10 namespace pepper { | 10 namespace pepper { |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 PP_Resource Resource::GetReferenceNoAddRef() const { | 28 PP_Resource Resource::GetReferenceNoAddRef() const { |
29 return resource_id_; | 29 return resource_id_; |
30 } | 30 } |
31 | 31 |
32 void Resource::StoppedTracking() { | 32 void Resource::StoppedTracking() { |
33 DCHECK(resource_id_ != 0); | 33 DCHECK(resource_id_ != 0); |
34 resource_id_ = 0; | 34 resource_id_ = 0; |
35 } | 35 } |
36 | 36 |
| 37 #define DEFINE_TYPE_GETTER(RESOURCE) \ |
| 38 RESOURCE* Resource::As##RESOURCE() { return NULL; } |
| 39 FOR_ALL_RESOURCES(DEFINE_TYPE_GETTER) |
| 40 #undef DEFINE_TYPE_GETTER |
| 41 |
37 } // namespace pepper | 42 } // namespace pepper |
OLD | NEW |