| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_3D_DEVICE_DELEGATE_H_ | |
| 6 #define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_3D_DEVICE_DELEGATE_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "third_party/npapi/bindings/npapi_extensions.h" | |
| 10 | |
| 11 namespace webkit_glue { | |
| 12 | |
| 13 // Interface for the NPAPI 3D device extension. This class implements "NOP" | |
| 14 // versions of all these functions so it can be used seamlessly by the | |
| 15 // "regular" plugin delegate while being overridden by the "pepper" one. | |
| 16 class WebPlugin3DDeviceDelegate { | |
| 17 public: | |
| 18 virtual NPError Device3DQueryCapability(int32 capability, int32* value); | |
| 19 virtual NPError Device3DQueryConfig(const NPDeviceContext3DConfig* request, | |
| 20 NPDeviceContext3DConfig* obtain); | |
| 21 virtual NPError Device3DInitializeContext( | |
| 22 const NPDeviceContext3DConfig* config, | |
| 23 NPDeviceContext3D* context); | |
| 24 virtual NPError Device3DSetStateContext(NPDeviceContext3D* context, | |
| 25 int32 state, | |
| 26 intptr_t value); | |
| 27 virtual NPError Device3DGetStateContext(NPDeviceContext3D* context, | |
| 28 int32 state, | |
| 29 intptr_t* value); | |
| 30 virtual NPError Device3DFlushContext(NPP id, | |
| 31 NPDeviceContext3D* context, | |
| 32 NPDeviceFlushContextCallbackPtr callback, | |
| 33 void* user_data); | |
| 34 virtual NPError Device3DDestroyContext(NPDeviceContext3D* context); | |
| 35 virtual NPError Device3DCreateBuffer(NPDeviceContext3D* context, | |
| 36 size_t size, | |
| 37 int32* id); | |
| 38 virtual NPError Device3DDestroyBuffer(NPDeviceContext3D* context, | |
| 39 int32 id); | |
| 40 virtual NPError Device3DMapBuffer(NPDeviceContext3D* context, | |
| 41 int32 id, | |
| 42 NPDeviceBuffer* buffer); | |
| 43 virtual NPError Device3DGetNumConfigs(int32* num_configs); | |
| 44 virtual NPError Device3DGetConfigAttribs(int32 config, | |
| 45 int32* attrib_list); | |
| 46 virtual NPError Device3DCreateContext(int32 config, | |
| 47 const int32* attrib_list, | |
| 48 NPDeviceContext3D** context); | |
| 49 virtual NPError Device3DRegisterCallback( | |
| 50 NPP id, | |
| 51 NPDeviceContext* context, | |
| 52 int32 callback_type, | |
| 53 NPDeviceGenericCallbackPtr callback, | |
| 54 void* callback_data); | |
| 55 virtual NPError Device3DSynchronizeContext( | |
| 56 NPP id, | |
| 57 NPDeviceContext3D* context, | |
| 58 NPDeviceSynchronizationMode mode, | |
| 59 const int32* input_attrib_list, | |
| 60 int32* output_attrib_list, | |
| 61 NPDeviceSynchronizeContextCallbackPtr callback, | |
| 62 void* callback_data); | |
| 63 | |
| 64 protected: | |
| 65 WebPlugin3DDeviceDelegate() {} | |
| 66 virtual ~WebPlugin3DDeviceDelegate() {} | |
| 67 }; | |
| 68 | |
| 69 } // namespace webkit_glue | |
| 70 | |
| 71 #endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_3D_DEVICE_DELEGATE_H_ | |
| OLD | NEW |