| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_ | 26 #ifndef WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_ |
| 27 #define WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_ | 27 #define WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_ |
| 28 | 28 |
| 29 #include "base/basictypes.h" | 29 #include "base/basictypes.h" |
| 30 #include "base/scoped_ptr.h" | 30 #include "base/scoped_ptr.h" |
| 31 #include "webkit/glue/plugins/nphostapi.h" | 31 #include "webkit/glue/plugins/nphostapi.h" |
| 32 #if !defined(INDEPENDENT_PLUGIN) | 32 #if !defined(INDEPENDENT_PLUGIN) |
| 33 #include "gpu/command_buffer/client/gles2_implementation.h" | 33 #include "gpu/pgl/pgl.h" |
| 34 #include "webkit/tools/pepper_test_plugin/command_buffer_pepper.h" | |
| 35 #endif | 34 #endif |
| 36 | 35 |
| 37 extern NPNetscapeFuncs* browser; | 36 extern NPNetscapeFuncs* browser; |
| 38 | 37 |
| 39 class PluginObject { | 38 class PluginObject { |
| 40 public: | 39 public: |
| 41 explicit PluginObject(NPP npp); | 40 explicit PluginObject(NPP npp); |
| 42 ~PluginObject(); | 41 ~PluginObject(); |
| 43 | 42 |
| 44 static NPClass* GetPluginClass(); | 43 static NPClass* GetPluginClass(); |
| 45 | 44 |
| 46 NPObject* header() { return &header_; } | 45 NPObject* header() { return &header_; } |
| 47 NPP npp() const { return npp_; } | 46 NPP npp() const { return npp_; } |
| 48 | 47 |
| 49 void New(NPMIMEType pluginType, int16 argc, char* argn[], char* argv[]); | 48 void New(NPMIMEType pluginType, int16 argc, char* argn[], char* argv[]); |
| 50 void SetWindow(const NPWindow& window); | 49 void SetWindow(const NPWindow& window); |
| 51 void Draw3D(); | 50 void Draw3D(); |
| 52 | 51 |
| 53 private: | 52 private: |
| 54 bool InitializeCommandBuffer(); | |
| 55 | |
| 56 NPObject header_; | 53 NPObject header_; |
| 57 NPP npp_; | 54 NPP npp_; |
| 58 NPObject* test_object_; | 55 NPObject* test_object_; |
| 59 int dimensions_; | 56 int dimensions_; |
| 60 | 57 |
| 61 NPDevice* device2d_; | 58 NPDevice* device2d_; |
| 59 NPDevice* device3d_; |
| 60 |
| 61 #if !defined(INDEPENDENT_PLUGIN) |
| 62 PGLContext pgl_context_; |
| 63 #endif |
| 64 |
| 62 NPDevice* deviceaudio_; | 65 NPDevice* deviceaudio_; |
| 63 | 66 |
| 67 NPDeviceContext3D context3d_; |
| 64 NPDeviceContextAudio context_audio_; | 68 NPDeviceContextAudio context_audio_; |
| 65 | 69 |
| 66 #if !defined(INDEPENDENT_PLUGIN) | |
| 67 scoped_ptr<CommandBufferPepper> command_buffer_; | |
| 68 scoped_ptr<gpu::gles2::GLES2CmdHelper> helper_; | |
| 69 scoped_ptr<gpu::gles2::GLES2Implementation> gles2_implementation_; | |
| 70 #endif | |
| 71 | 70 |
| 72 int width_; | 71 int width_; |
| 73 int height_; | 72 int height_; |
| 74 | 73 |
| 75 DISALLOW_COPY_AND_ASSIGN(PluginObject); | 74 DISALLOW_COPY_AND_ASSIGN(PluginObject); |
| 76 }; | 75 }; |
| 77 | 76 |
| 78 | 77 |
| 79 #endif // WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_ | 78 #endif // WEBKIT_TOOLS_PEPPER_TEST_PLUGIN_PLUGIN_OBJECT_H_ |
| OLD | NEW |