| 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/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 9 #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" |
| 10 #include "content/renderer/pepper/pepper_parent_context_provider.h" | 12 #include "content/renderer/pepper/pepper_parent_context_provider.h" |
| 11 #include "content/renderer/render_widget_fullscreen.h" | 13 #include "content/renderer/render_widget_fullscreen.h" |
| 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h" |
| 14 #include "webkit/plugins/ppapi/fullscreen_container.h" | 16 #include "webkit/plugins/ppapi/fullscreen_container.h" |
| 15 | 17 |
| 16 class WebGraphicsContext3DCommandBufferImpl; | 18 class WebGraphicsContext3DCommandBufferImpl; |
| 17 | 19 |
| 18 namespace webkit { | 20 namespace webkit { |
| 19 namespace ppapi { | 21 namespace ppapi { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 43 virtual void OnViewContextSwapBuffersAborted() OVERRIDE; | 45 virtual void OnViewContextSwapBuffersAborted() OVERRIDE; |
| 44 | 46 |
| 45 // pepper::FullscreenContainer API. | 47 // pepper::FullscreenContainer API. |
| 46 virtual void Invalidate() OVERRIDE; | 48 virtual void Invalidate() OVERRIDE; |
| 47 virtual void InvalidateRect(const WebKit::WebRect& rect) OVERRIDE; | 49 virtual void InvalidateRect(const WebKit::WebRect& rect) OVERRIDE; |
| 48 virtual void ScrollRect(int dx, int dy, const WebKit::WebRect& rect) OVERRIDE; | 50 virtual void ScrollRect(int dx, int dy, const WebKit::WebRect& rect) OVERRIDE; |
| 49 virtual void Destroy() OVERRIDE; | 51 virtual void Destroy() OVERRIDE; |
| 50 virtual void DidChangeCursor(const WebKit::WebCursorInfo& cursor) OVERRIDE; | 52 virtual void DidChangeCursor(const WebKit::WebCursorInfo& cursor) OVERRIDE; |
| 51 virtual webkit::ppapi::PluginDelegate::PlatformContext3D* | 53 virtual webkit::ppapi::PluginDelegate::PlatformContext3D* |
| 52 CreateContext3D() OVERRIDE; | 54 CreateContext3D() OVERRIDE; |
| 55 virtual MouseLockDispatcher* GetMouseLockDispatcher() OVERRIDE; |
| 56 |
| 57 // IPC::Channel::Listener implementation. This overrides the implementation |
| 58 // in RenderWidgetFullscreen. |
| 59 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 53 | 60 |
| 54 WebGraphicsContext3DCommandBufferImpl* context() const { return context_; } | 61 WebGraphicsContext3DCommandBufferImpl* context() const { return context_; } |
| 55 void SwapBuffers(); | 62 void SwapBuffers(); |
| 56 | 63 |
| 57 // Could be NULL when this widget is closing. | 64 // Could be NULL when this widget is closing. |
| 58 webkit::ppapi::PluginInstance* plugin() const { return plugin_; } | 65 webkit::ppapi::PluginInstance* plugin() const { return plugin_; } |
| 59 | 66 |
| 60 protected: | 67 protected: |
| 61 RenderWidgetFullscreenPepper(webkit::ppapi::PluginInstance* plugin, | 68 RenderWidgetFullscreenPepper(webkit::ppapi::PluginInstance* plugin, |
| 62 const GURL& active_url); | 69 const GURL& active_url); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // The plugin instance this widget wraps. | 110 // The plugin instance this widget wraps. |
| 104 webkit::ppapi::PluginInstance* plugin_; | 111 webkit::ppapi::PluginInstance* plugin_; |
| 105 | 112 |
| 106 // GL context for compositing. | 113 // GL context for compositing. |
| 107 WebGraphicsContext3DCommandBufferImpl* context_; | 114 WebGraphicsContext3DCommandBufferImpl* context_; |
| 108 unsigned int buffer_; | 115 unsigned int buffer_; |
| 109 unsigned int program_; | 116 unsigned int program_; |
| 110 | 117 |
| 111 base::WeakPtrFactory<RenderWidgetFullscreenPepper> weak_ptr_factory_; | 118 base::WeakPtrFactory<RenderWidgetFullscreenPepper> weak_ptr_factory_; |
| 112 | 119 |
| 120 scoped_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; |
| 121 |
| 113 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); | 122 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); |
| 114 }; | 123 }; |
| 115 | 124 |
| 116 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 125 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
| OLD | NEW |