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 #include "webkit/glue/plugins/pepper_plugin_delegate.h" | 5 #include "webkit/plugins/ppapi/plugin_delegate.h" |
6 | 6 |
7 #ifdef ENABLE_GPU | 7 #ifdef ENABLE_GPU |
8 | 8 |
9 namespace ggl { | 9 namespace ggl { |
10 | 10 |
11 class Context; | 11 class Context; |
12 | 12 |
13 } // namespace ggl; | 13 } // namespace ggl; |
14 | 14 |
15 class PlatformContext3DImpl : public pepper::PluginDelegate::PlatformContext3D { | 15 class PlatformContext3DImpl |
| 16 : public webkit::ppapi::PluginDelegate::PlatformContext3D { |
16 public: | 17 public: |
17 explicit PlatformContext3DImpl(ggl::Context* parent_context); | 18 explicit PlatformContext3DImpl(ggl::Context* parent_context); |
18 virtual ~PlatformContext3DImpl(); | 19 virtual ~PlatformContext3DImpl(); |
19 | 20 |
20 virtual bool Init(); | 21 virtual bool Init(); |
21 virtual bool SwapBuffers(); | 22 virtual bool SwapBuffers(); |
22 virtual unsigned GetError(); | 23 virtual unsigned GetError(); |
23 virtual void SetSwapBuffersCallback(Callback0::Type* callback); | 24 virtual void SetSwapBuffersCallback(Callback0::Type* callback); |
24 void ResizeBackingTexture(const gfx::Size& size); | 25 void ResizeBackingTexture(const gfx::Size& size); |
25 virtual unsigned GetBackingTextureId(); | 26 virtual unsigned GetBackingTextureId(); |
26 virtual gpu::gles2::GLES2Implementation* GetGLES2Implementation(); | 27 virtual gpu::gles2::GLES2Implementation* GetGLES2Implementation(); |
27 | 28 |
28 private: | 29 private: |
29 ggl::Context* parent_context_; | 30 ggl::Context* parent_context_; |
30 ggl::Context* context_; | 31 ggl::Context* context_; |
31 }; | 32 }; |
32 | 33 |
33 #endif // ENABLE_GPU | 34 #endif // ENABLE_GPU |
34 | 35 |
OLD | NEW |