| 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/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 11 #include "content/renderer/mouse_lock_dispatcher.h" | 11 #include "content/renderer/mouse_lock_dispatcher.h" |
| 12 #include "content/renderer/pepper/pepper_parent_context_provider.h" | 12 #include "content/renderer/pepper/pepper_parent_context_provider.h" |
| 13 #include "content/renderer/render_widget_fullscreen.h" | 13 #include "content/renderer/render_widget_fullscreen.h" |
| 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h" |
| 16 #include "webkit/plugins/ppapi/fullscreen_container.h" | 16 #include "webkit/plugins/ppapi/fullscreen_container.h" |
| 17 | 17 |
| 18 class WebGraphicsContext3DCommandBufferImpl; | 18 class WebGraphicsContext3DCommandBufferImpl; |
| 19 | 19 |
| 20 namespace webkit { | 20 namespace webkit { |
| 21 namespace ppapi { | 21 namespace ppapi { |
| 22 | 22 |
| 23 class PluginInstance; | 23 class PluginInstance; |
| 24 | 24 |
| 25 } // namespace ppapi | 25 } // namespace ppapi |
| 26 } // namespace webkit | 26 } // namespace webkit |
| 27 | 27 |
| 28 namespace content { |
| 29 |
| 28 // A RenderWidget that hosts a fullscreen pepper plugin. This provides a | 30 // A RenderWidget that hosts a fullscreen pepper plugin. This provides a |
| 29 // FullscreenContainer that the plugin instance can callback into to e.g. | 31 // FullscreenContainer that the plugin instance can callback into to e.g. |
| 30 // invalidate rects. | 32 // invalidate rects. |
| 31 class RenderWidgetFullscreenPepper : | 33 class RenderWidgetFullscreenPepper : |
| 32 public RenderWidgetFullscreen, | 34 public RenderWidgetFullscreen, |
| 33 public webkit::ppapi::FullscreenContainer, | 35 public webkit::ppapi::FullscreenContainer, |
| 34 public content::PepperParentContextProvider, | 36 public PepperParentContextProvider, |
| 35 public WebGraphicsContext3DSwapBuffersClient { | 37 public WebGraphicsContext3DSwapBuffersClient { |
| 36 public: | 38 public: |
| 37 static RenderWidgetFullscreenPepper* Create( | 39 static RenderWidgetFullscreenPepper* Create( |
| 38 int32 opener_id, | 40 int32 opener_id, |
| 39 webkit::ppapi::PluginInstance* plugin, | 41 webkit::ppapi::PluginInstance* plugin, |
| 40 const GURL& active_url, | 42 const GURL& active_url, |
| 41 const WebKit::WebScreenInfo& screen_info); | 43 const WebKit::WebScreenInfo& screen_info); |
| 42 | 44 |
| 43 // WebGraphicscontext3DSwapBuffersClient implementation | 45 // WebGraphicscontext3DSwapBuffersClient implementation |
| 44 virtual void OnViewContextSwapBuffersPosted() OVERRIDE; | 46 virtual void OnViewContextSwapBuffersPosted() OVERRIDE; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 unsigned int buffer_; | 122 unsigned int buffer_; |
| 121 unsigned int program_; | 123 unsigned int program_; |
| 122 | 124 |
| 123 base::WeakPtrFactory<RenderWidgetFullscreenPepper> weak_ptr_factory_; | 125 base::WeakPtrFactory<RenderWidgetFullscreenPepper> weak_ptr_factory_; |
| 124 | 126 |
| 125 scoped_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; | 127 scoped_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; |
| 126 | 128 |
| 127 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); | 129 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); |
| 128 }; | 130 }; |
| 129 | 131 |
| 132 } // namespace content |
| 133 |
| 130 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 134 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
| OLD | NEW |