| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
| 6 #define CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "content/common/gpu/client/content_gl_context.h" | 9 #include "content/common/gpu/client/content_gl_context.h" |
| 10 #include "content/renderer/pepper/pepper_parent_context_provider.h" | 10 #include "content/renderer/pepper/pepper_parent_context_provider.h" |
| 11 #include "content/renderer/render_widget_fullscreen.h" | 11 #include "content/renderer/render_widget_fullscreen.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h" |
| 13 #include "webkit/plugins/ppapi/fullscreen_container.h" | 13 #include "webkit/plugins/ppapi/fullscreen_container.h" |
| 14 | 14 |
| 15 namespace webkit { | 15 namespace webkit { |
| 16 namespace ppapi { | 16 namespace ppapi { |
| 17 | 17 |
| 18 class PluginInstance; | 18 class PluginInstance; |
| 19 | 19 |
| 20 } // namespace ppapi | 20 } // namespace ppapi |
| 21 } // namespace webkit | 21 } // namespace webkit |
| 22 | 22 |
| 23 // A RenderWidget that hosts a fullscreen pepper plugin. This provides a | 23 // A RenderWidget that hosts a fullscreen pepper plugin. This provides a |
| 24 // FullscreenContainer that the plugin instance can callback into to e.g. | 24 // FullscreenContainer that the plugin instance can callback into to e.g. |
| 25 // invalidate rects. | 25 // invalidate rects. |
| 26 class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, | 26 class RenderWidgetFullscreenPepper |
| 27 public webkit::ppapi::FullscreenContainer, | 27 : public RenderWidgetFullscreen, |
| 28 public PepperParentContextProvider { | 28 public webkit::ppapi::FullscreenContainer, |
| 29 public content::PepperParentContextProvider { |
| 29 public: | 30 public: |
| 30 static RenderWidgetFullscreenPepper* Create( | 31 static RenderWidgetFullscreenPepper* Create( |
| 31 int32 opener_id, | 32 int32 opener_id, |
| 32 webkit::ppapi::PluginInstance* plugin, | 33 webkit::ppapi::PluginInstance* plugin, |
| 33 const GURL& active_url); | 34 const GURL& active_url); |
| 34 | 35 |
| 35 // pepper::FullscreenContainer API. | 36 // pepper::FullscreenContainer API. |
| 36 virtual void Invalidate() OVERRIDE; | 37 virtual void Invalidate() OVERRIDE; |
| 37 virtual void InvalidateRect(const WebKit::WebRect& rect) OVERRIDE; | 38 virtual void InvalidateRect(const WebKit::WebRect& rect) OVERRIDE; |
| 38 virtual void ScrollRect(int dx, int dy, const WebKit::WebRect& rect) OVERRIDE; | 39 virtual void ScrollRect(int dx, int dy, const WebKit::WebRect& rect) OVERRIDE; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 ContentGLContext* context_; | 104 ContentGLContext* context_; |
| 104 unsigned int buffer_; | 105 unsigned int buffer_; |
| 105 unsigned int program_; | 106 unsigned int program_; |
| 106 | 107 |
| 107 base::WeakPtrFactory<RenderWidgetFullscreenPepper> weak_ptr_factory_; | 108 base::WeakPtrFactory<RenderWidgetFullscreenPepper> weak_ptr_factory_; |
| 108 | 109 |
| 109 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); | 110 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); |
| 110 }; | 111 }; |
| 111 | 112 |
| 112 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 113 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
| OLD | NEW |