| 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 #include "ppapi/proxy/plugin_resource.h" | 5 #include "ppapi/proxy/plugin_resource.h" |
| 6 | 6 |
| 7 namespace pp { | 7 namespace pp { |
| 8 namespace proxy { | 8 namespace proxy { |
| 9 | 9 |
| 10 PluginResource::PluginResource(const HostResource& resource) | 10 PluginResource::PluginResource(const HostResource& resource) |
| 11 : host_resource_(resource) { | 11 : ResourceObjectBase(resource.instance()), |
| 12 host_resource_(resource) { |
| 12 } | 13 } |
| 13 | 14 |
| 14 PluginResource::~PluginResource() { | 15 PluginResource::~PluginResource() { |
| 15 } | 16 } |
| 16 | 17 |
| 17 #define DEFINE_TYPE_GETTER(RESOURCE) \ | 18 #define DEFINE_TYPE_GETTER(RESOURCE) \ |
| 18 RESOURCE* PluginResource::As##RESOURCE() { return NULL; } | 19 RESOURCE* PluginResource::As##RESOURCE() { return NULL; } |
| 19 FOR_ALL_PLUGIN_RESOURCES(DEFINE_TYPE_GETTER) | 20 FOR_ALL_PLUGIN_RESOURCES(DEFINE_TYPE_GETTER) |
| 20 #undef DEFINE_TYPE_GETTER | 21 #undef DEFINE_TYPE_GETTER |
| 21 | 22 |
| 22 PluginDispatcher* PluginResource::GetDispatcher() { | 23 PluginDispatcher* PluginResource::GetDispatcher() { |
| 23 PluginDispatcher* disp = PluginDispatcher::GetForInstance(instance()); | 24 PluginDispatcher* disp = PluginDispatcher::GetForInstance(instance()); |
| 24 CHECK(disp); | 25 CHECK(disp); |
| 25 return disp; | 26 return disp; |
| 26 } | 27 } |
| 27 | 28 |
| 28 } // namespace proxy | 29 } // namespace proxy |
| 29 } // namespace pp | 30 } // namespace pp |
| OLD | NEW |