| 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 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_callback_factory.h" | 8 #include "base/memory/scoped_callback_factory.h" |
| 9 #include "ppapi/shared_impl/graphics_3d_impl.h" | 9 #include "ppapi/shared_impl/graphics_3d_impl.h" |
| 10 #include "webkit/plugins/ppapi/plugin_delegate.h" | 10 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 11 #include "webkit/plugins/ppapi/resource.h" | 11 #include "webkit/plugins/ppapi/resource.h" |
| 12 | 12 |
| 13 namespace webkit { | 13 namespace webkit { |
| 14 namespace ppapi { | 14 namespace ppapi { |
| 15 | 15 |
| 16 class PPB_Graphics3D_Impl : public Resource, | 16 class PPB_Graphics3D_Impl : public Resource, |
| 17 public ::ppapi::Graphics3DImpl { | 17 public ::ppapi::Graphics3DImpl { |
| 18 public: | 18 public: |
| 19 virtual ~PPB_Graphics3D_Impl(); | 19 virtual ~PPB_Graphics3D_Impl(); |
| 20 | 20 |
| 21 static PP_Resource Create(PluginInstance* instance, | 21 static PP_Resource Create(PluginInstance* instance, |
| 22 PP_Config3D_Dev config, | 22 PP_Config3D_Dev config, |
| 23 PP_Resource share_context, | 23 PP_Resource share_context, |
| 24 const int32_t* attrib_list); | 24 const int32_t* attrib_list); |
| 25 static PP_Resource CreateRaw(PluginInstance* instance, | 25 static PP_Resource CreateRaw(PluginInstance* instance, |
| 26 PP_Config3D_Dev config, | 26 PP_Config3D_Dev config, |
| 27 PP_Resource share_context, | 27 PP_Resource share_context, |
| 28 const int32_t* attrib_list); | 28 const int32_t* attrib_list); |
| 29 | 29 |
| 30 // ResourceObjectBase override. | 30 // Resource override. |
| 31 virtual ::ppapi::thunk::PPB_Graphics3D_API* AsPPB_Graphics3D_API() OVERRIDE; | 31 virtual ::ppapi::thunk::PPB_Graphics3D_API* AsPPB_Graphics3D_API() OVERRIDE; |
| 32 | 32 |
| 33 // PPB_Graphics3D_API trusted implementation. | 33 // PPB_Graphics3D_API trusted implementation. |
| 34 virtual PP_Bool InitCommandBuffer(int32_t size) OVERRIDE; | 34 virtual PP_Bool InitCommandBuffer(int32_t size) OVERRIDE; |
| 35 virtual PP_Bool GetRingBuffer(int* shm_handle, | 35 virtual PP_Bool GetRingBuffer(int* shm_handle, |
| 36 uint32_t* shm_size) OVERRIDE; | 36 uint32_t* shm_size) OVERRIDE; |
| 37 virtual PP_Graphics3DTrustedState GetState() OVERRIDE; | 37 virtual PP_Graphics3DTrustedState GetState() OVERRIDE; |
| 38 virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE; | 38 virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE; |
| 39 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; | 39 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; |
| 40 virtual PP_Bool GetTransferBuffer(int32_t id, | 40 virtual PP_Bool GetTransferBuffer(int32_t id, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 scoped_ptr<PluginDelegate::PlatformContext3D> platform_context_; | 88 scoped_ptr<PluginDelegate::PlatformContext3D> platform_context_; |
| 89 base::ScopedCallbackFactory<PPB_Graphics3D_Impl> callback_factory_; | 89 base::ScopedCallbackFactory<PPB_Graphics3D_Impl> callback_factory_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Impl); | 91 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Impl); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace ppapi | 94 } // namespace ppapi |
| 95 } // namespace webkit | 95 } // namespace webkit |
| 96 | 96 |
| 97 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ | 97 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ |
| OLD | NEW |