| 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 #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 "ppapi/c/dev/ppb_graphics_3d_dev.h" | 8 #include "ppapi/thunk/ppb_graphics_3d_api.h" |
| 9 #include "webkit/plugins/ppapi/resource.h" | 9 #include "webkit/plugins/ppapi/resource.h" |
| 10 | 10 |
| 11 namespace webkit { | 11 namespace webkit { |
| 12 namespace ppapi { | 12 namespace ppapi { |
| 13 | 13 |
| 14 class PPB_Graphics3D_Impl : public Resource { | 14 class PPB_Graphics3D_Impl : public Resource, |
| 15 public ::ppapi::thunk::PPB_Graphics3D_API { |
| 15 public: | 16 public: |
| 16 explicit PPB_Graphics3D_Impl(PluginInstance* instance); | |
| 17 virtual ~PPB_Graphics3D_Impl(); | 17 virtual ~PPB_Graphics3D_Impl(); |
| 18 | 18 |
| 19 static const PPB_Graphics3D_Dev* GetInterface(); | 19 static PP_Resource Create(PP_Instance instance, |
| 20 PP_Config3D_Dev config, |
| 21 PP_Resource share_context, |
| 22 const int32_t* attrib_list); |
| 20 | 23 |
| 21 // Resource override. | 24 // ResourceObjectBase override. |
| 22 virtual PPB_Graphics3D_Impl* AsPPB_Graphics3D_Impl(); | 25 virtual ::ppapi::thunk::PPB_Graphics3D_API* AsPPB_Graphics3D_API() OVERRIDE; |
| 26 |
| 27 // PPB_Graphics3D_API implementation. |
| 28 virtual int32_t GetAttribs(int32_t* attrib_list) OVERRIDE; |
| 29 virtual int32_t SetAttribs(int32_t* attrib_list) OVERRIDE; |
| 30 virtual int32_t SwapBuffers(PP_CompletionCallback callback) OVERRIDE; |
| 31 |
| 32 private: |
| 33 explicit PPB_Graphics3D_Impl(PluginInstance* instance); |
| 23 | 34 |
| 24 bool Init(PP_Config3D_Dev config, | 35 bool Init(PP_Config3D_Dev config, |
| 25 PP_Resource share_context, | 36 PP_Resource share_context, |
| 26 const int32_t* attrib_list); | 37 const int32_t* attrib_list); |
| 27 | 38 |
| 28 private: | |
| 29 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Impl); | 39 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Impl); |
| 30 }; | 40 }; |
| 31 | 41 |
| 32 } // namespace ppapi | 42 } // namespace ppapi |
| 33 } // namespace webkit | 43 } // namespace webkit |
| 34 | 44 |
| 35 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ | 45 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ |
| 36 | 46 |
| OLD | NEW |