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 "webkit/plugins/ppapi/ppb_proxy_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_proxy_impl.h" |
6 | 6 |
7 #include "ppapi/c/private/ppb_proxy_private.h" | 7 #include "ppapi/c/private/ppb_proxy_private.h" |
8 #include "ppapi/thunk/enter.h" | 8 #include "ppapi/thunk/enter.h" |
9 #include "ppapi/thunk/ppb_image_data_api.h" | 9 #include "ppapi/thunk/ppb_image_data_api.h" |
10 #include "webkit/plugins/ppapi/plugin_module.h" | 10 #include "webkit/plugins/ppapi/plugin_module.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 void PluginCrashed(PP_Module module) { | 24 void PluginCrashed(PP_Module module) { |
25 PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module); | 25 PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module); |
26 if (plugin_module) | 26 if (plugin_module) |
27 plugin_module->PluginCrashed(); | 27 plugin_module->PluginCrashed(); |
28 } | 28 } |
29 | 29 |
30 PP_Instance GetInstanceForResource(PP_Resource resource) { | 30 PP_Instance GetInstanceForResource(PP_Resource resource) { |
31 scoped_refptr<Resource> obj(ResourceTracker::Get()->GetResource(resource)); | 31 ::ppapi::Resource* obj = ResourceTracker::Get()->GetResource(resource); |
32 if (!obj) | 32 if (!obj) |
33 return 0; | 33 return 0; |
34 return obj->instance()->pp_instance(); | 34 return obj->pp_instance(); |
35 } | 35 } |
36 | 36 |
37 void SetReserveInstanceIDCallback(PP_Module module, | 37 void SetReserveInstanceIDCallback(PP_Module module, |
38 PP_Bool (*reserve)(PP_Module, PP_Instance)) { | 38 PP_Bool (*reserve)(PP_Module, PP_Instance)) { |
39 PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module); | 39 PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module); |
40 if (plugin_module) | 40 if (plugin_module) |
41 plugin_module->SetReserveInstanceIDCallback(reserve); | 41 plugin_module->SetReserveInstanceIDCallback(reserve); |
42 } | 42 } |
43 | 43 |
44 int32_t GetURLLoaderBufferedBytes(PP_Resource url_loader) { | 44 int32_t GetURLLoaderBufferedBytes(PP_Resource url_loader) { |
(...skipping 26 matching lines...) Expand all Loading... |
71 | 71 |
72 } // namespace | 72 } // namespace |
73 | 73 |
74 // static | 74 // static |
75 const PPB_Proxy_Private* PPB_Proxy_Impl::GetInterface() { | 75 const PPB_Proxy_Private* PPB_Proxy_Impl::GetInterface() { |
76 return &ppb_proxy; | 76 return &ppb_proxy; |
77 } | 77 } |
78 | 78 |
79 } // namespace ppapi | 79 } // namespace ppapi |
80 } // namespace webkit | 80 } // namespace webkit |
OLD | NEW |