OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
| 6 #define CHROME_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
| 7 |
| 8 #include "chrome/renderer/render_widget_fullscreen.h" |
| 9 #include "third_party/WebKit/WebKit/chromium/public/WebWidget.h" |
| 10 |
| 11 namespace pepper { |
| 12 class PluginInstance; |
| 13 class FullscreenContainer; |
| 14 } |
| 15 |
| 16 // A RenderWidget that hosts a fullscreen pepper plugin. This provides a |
| 17 // FullscreenContainer that the plugin instance can callback into to e.g. |
| 18 // invalidate rects. |
| 19 class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen { |
| 20 public: |
| 21 static RenderWidgetFullscreenPepper* Create( |
| 22 int32 opener_id, |
| 23 RenderThreadBase* render_thread, |
| 24 pepper::PluginInstance* plugin); |
| 25 |
| 26 // Asks the browser to close this view, which will tear off the window and |
| 27 // close this widget. |
| 28 void SendClose(); |
| 29 |
| 30 // Invalidate the whole widget to force a redraw. |
| 31 void GenerateFullRepaint(); |
| 32 |
| 33 pepper::FullscreenContainer* container() const { return container_.get(); } |
| 34 |
| 35 protected: |
| 36 RenderWidgetFullscreenPepper(RenderThreadBase* render_thread, |
| 37 pepper::PluginInstance* plugin); |
| 38 virtual ~RenderWidgetFullscreenPepper(); |
| 39 |
| 40 // RenderWidget API. |
| 41 virtual void DidInitiatePaint(); |
| 42 virtual void DidFlushPaint(); |
| 43 virtual void Close(); |
| 44 |
| 45 // RenderWidgetFullscreen API. |
| 46 virtual WebKit::WebWidget* CreateWebWidget(); |
| 47 |
| 48 private: |
| 49 // The plugin instance this widget wraps. |
| 50 pepper::PluginInstance* plugin_; |
| 51 |
| 52 // The FullscreenContainer that the plugin instance can callback into. |
| 53 scoped_ptr<pepper::FullscreenContainer> container_; |
| 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); |
| 56 }; |
| 57 |
| 58 #endif // CHROME_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
OLD | NEW |