| 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_graphics_3d_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "gpu/command_buffer/client/gles2_implementation.h" | 8 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 9 #include "webkit/plugins/ppapi/plugin_module.h" | 9 #include "webkit/plugins/ppapi/plugin_module.h" |
| 10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 238 } |
| 239 | 239 |
| 240 void PPB_Graphics3D_Impl::SendContextLost() { | 240 void PPB_Graphics3D_Impl::SendContextLost() { |
| 241 // By the time we run this, the instance may have been deleted, or in the | 241 // By the time we run this, the instance may have been deleted, or in the |
| 242 // process of being deleted. Even in the latter case, we don't want to send a | 242 // process of being deleted. Even in the latter case, we don't want to send a |
| 243 // callback after DidDestroy. | 243 // callback after DidDestroy. |
| 244 PluginInstance* instance = ResourceHelper::GetPluginInstance(this); | 244 PluginInstance* instance = ResourceHelper::GetPluginInstance(this); |
| 245 if (!instance || !instance->container()) | 245 if (!instance || !instance->container()) |
| 246 return; | 246 return; |
| 247 | 247 |
| 248 const PPP_Graphics3D_Dev* ppp_graphics_3d = | 248 const PPP_Graphics3D* ppp_graphics_3d = |
| 249 static_cast<const PPP_Graphics3D_Dev*>( | 249 static_cast<const PPP_Graphics3D*>( |
| 250 instance->module()->GetPluginInterface( | 250 instance->module()->GetPluginInterface( |
| 251 PPP_GRAPHICS_3D_DEV_INTERFACE)); | 251 PPP_GRAPHICS_3D_INTERFACE)); |
| 252 if (ppp_graphics_3d) | 252 if (ppp_graphics_3d) |
| 253 ppp_graphics_3d->Graphics3DContextLost(pp_instance()); | 253 ppp_graphics_3d->Graphics3DContextLost(pp_instance()); |
| 254 } | 254 } |
| 255 | 255 |
| 256 } // namespace ppapi | 256 } // namespace ppapi |
| 257 } // namespace webkit | 257 } // namespace webkit |
| OLD | NEW |