OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/task.h" | 8 #include "base/task.h" |
9 #include "content/renderer/render_widget_fullscreen.h" | 9 #include "content/renderer/render_widget_fullscreen.h" |
10 #include "content/renderer/gpu/renderer_gl_context.h" | 10 #include "content/renderer/gpu/renderer_gl_context.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 virtual void Invalidate(); | 34 virtual void Invalidate(); |
35 virtual void InvalidateRect(const WebKit::WebRect& rect); | 35 virtual void InvalidateRect(const WebKit::WebRect& rect); |
36 virtual void ScrollRect(int dx, int dy, const WebKit::WebRect& rect); | 36 virtual void ScrollRect(int dx, int dy, const WebKit::WebRect& rect); |
37 virtual void Destroy(); | 37 virtual void Destroy(); |
38 virtual void DidChangeCursor(const WebKit::WebCursorInfo& cursor); | 38 virtual void DidChangeCursor(const WebKit::WebCursorInfo& cursor); |
39 virtual webkit::ppapi::PluginDelegate::PlatformContext3D* CreateContext3D(); | 39 virtual webkit::ppapi::PluginDelegate::PlatformContext3D* CreateContext3D(); |
40 | 40 |
41 RendererGLContext* context() const { return context_; } | 41 RendererGLContext* context() const { return context_; } |
42 void SwapBuffers(); | 42 void SwapBuffers(); |
43 | 43 |
| 44 // Could be NULL when this widget is closing. |
| 45 webkit::ppapi::PluginInstance* plugin() const { return plugin_; } |
| 46 |
44 protected: | 47 protected: |
45 RenderWidgetFullscreenPepper(webkit::ppapi::PluginInstance* plugin, | 48 RenderWidgetFullscreenPepper(webkit::ppapi::PluginInstance* plugin, |
46 const GURL& active_url); | 49 const GURL& active_url); |
47 virtual ~RenderWidgetFullscreenPepper(); | 50 virtual ~RenderWidgetFullscreenPepper(); |
48 | 51 |
49 // RenderWidget API. | 52 // RenderWidget API. |
50 virtual void DidInitiatePaint(); | 53 virtual void DidInitiatePaint(); |
51 virtual void DidFlushPaint(); | 54 virtual void DidFlushPaint(); |
52 virtual void Close(); | 55 virtual void Close(); |
53 virtual webkit::ppapi::PluginInstance* GetBitmapForOptimizedPluginPaint( | 56 virtual webkit::ppapi::PluginInstance* GetBitmapForOptimizedPluginPaint( |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 RendererGLContext* context_; | 95 RendererGLContext* context_; |
93 unsigned int buffer_; | 96 unsigned int buffer_; |
94 unsigned int program_; | 97 unsigned int program_; |
95 | 98 |
96 ScopedRunnableMethodFactory<RenderWidgetFullscreenPepper> method_factory_; | 99 ScopedRunnableMethodFactory<RenderWidgetFullscreenPepper> method_factory_; |
97 | 100 |
98 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); | 101 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); |
99 }; | 102 }; |
100 | 103 |
101 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 104 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
OLD | NEW |