| 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 CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ | 5 #ifndef CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ |
| 6 #define CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ | 6 #define CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
| 10 | 10 |
| 11 #include "chrome/renderer/ggl/ggl.h" | 11 #include "chrome/renderer/ggl/ggl.h" |
| 12 #include "third_party/WebKit/WebKit/chromium/public/WebGLES2Context.h" | 12 #include "third_party/WebKit/WebKit/chromium/public/WebGLES2Context.h" |
| 13 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebSize.h" |
| 14 | 14 |
| 15 #if defined(OS_MACOSX) |
| 16 #include "gfx/native_widget_types.h" |
| 17 #endif |
| 18 |
| 15 class WebGLES2ContextImpl : public WebKit::WebGLES2Context { | 19 class WebGLES2ContextImpl : public WebKit::WebGLES2Context { |
| 16 public: | 20 public: |
| 17 WebGLES2ContextImpl(); | 21 WebGLES2ContextImpl(); |
| 18 virtual ~WebGLES2ContextImpl(); | 22 virtual ~WebGLES2ContextImpl(); |
| 19 | 23 |
| 20 // TODO(vangelis): Remove once method is removed from WebGLES2Context. | 24 // TODO(vangelis): Remove once method is removed from WebGLES2Context. |
| 21 virtual bool initialize(WebKit::WebView*); | 25 virtual bool initialize(WebKit::WebView*); |
| 22 virtual bool initialize(WebKit::WebView*, WebGLES2Context* parent); | 26 virtual bool initialize(WebKit::WebView*, WebGLES2Context* parent); |
| 23 virtual bool makeCurrent(); | 27 virtual bool makeCurrent(); |
| 24 virtual bool destroy(); | 28 virtual bool destroy(); |
| 25 virtual bool swapBuffers(); | 29 virtual bool swapBuffers(); |
| 26 | 30 |
| 27 virtual void resizeOffscreenContent(const WebKit::WebSize&); | 31 virtual void resizeOffscreenContent(const WebKit::WebSize&); |
| 28 virtual unsigned getOffscreenContentParentTextureId(); | 32 virtual unsigned getOffscreenContentParentTextureId(); |
| 29 | 33 |
| 30 #if defined(OS_MACOSX) | 34 #if defined(OS_MACOSX) |
| 31 virtual void resizeOnscreenContent(const WebKit::WebSize&); | 35 virtual void resizeOnscreenContent(const WebKit::WebSize&); |
| 32 #endif | 36 #endif |
| 33 | 37 |
| 34 ggl::Context* context() { return context_; } | 38 ggl::Context* context() { return context_; } |
| 35 | 39 |
| 36 private: | 40 private: |
| 37 // The GGL context we use for OpenGL rendering. | 41 // The GGL context we use for OpenGL rendering. |
| 38 ggl::Context* context_; | 42 ggl::Context* context_; |
| 43 |
| 44 #if defined(OS_MACOSX) |
| 45 gfx::PluginWindowHandle plugin_handle_; |
| 39 WebKit::WebView* web_view_; | 46 WebKit::WebView* web_view_; |
| 47 #endif |
| 40 }; | 48 }; |
| 41 | 49 |
| 42 #endif // defined(ENABLE_GPU) | 50 #endif // defined(ENABLE_GPU) |
| 43 #endif // CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ | 51 #endif // CHROME_RENDERER_WEBGLES2CONTEXT_IMPL_H_ |
| 44 | 52 |
| OLD | NEW |