Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3179)

Unified Diff: chrome/renderer/render_widget_fullscreen_pepper.h

Issue 3352019: Add fullscreen support to Pepper. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: git cl tree Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_widget_fullscreen.cc ('k') | chrome/renderer/render_widget_fullscreen_pepper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_widget_fullscreen_pepper.h
diff --git a/chrome/renderer/render_widget_fullscreen_pepper.h b/chrome/renderer/render_widget_fullscreen_pepper.h
new file mode 100644
index 0000000000000000000000000000000000000000..437e75de7945559f795afde4bb82044744112577
--- /dev/null
+++ b/chrome/renderer/render_widget_fullscreen_pepper.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_
+#define CHROME_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_
+
+#include "chrome/renderer/render_widget_fullscreen.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebWidget.h"
+
+namespace pepper {
+class PluginInstance;
+class FullscreenContainer;
+}
+
+// A RenderWidget that hosts a fullscreen pepper plugin. This provides a
+// FullscreenContainer that the plugin instance can callback into to e.g.
+// invalidate rects.
+class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen {
+ public:
+ static RenderWidgetFullscreenPepper* Create(
+ int32 opener_id,
+ RenderThreadBase* render_thread,
+ pepper::PluginInstance* plugin);
+
+ // Asks the browser to close this view, which will tear off the window and
+ // close this widget.
+ void SendClose();
+
+ // Invalidate the whole widget to force a redraw.
+ void GenerateFullRepaint();
+
+ pepper::FullscreenContainer* container() const { return container_.get(); }
+
+ protected:
+ RenderWidgetFullscreenPepper(RenderThreadBase* render_thread,
+ pepper::PluginInstance* plugin);
+ virtual ~RenderWidgetFullscreenPepper();
+
+ // RenderWidget API.
+ virtual void DidInitiatePaint();
+ virtual void DidFlushPaint();
+ virtual void Close();
+
+ // RenderWidgetFullscreen API.
+ virtual WebKit::WebWidget* CreateWebWidget();
+
+ private:
+ // The plugin instance this widget wraps.
+ pepper::PluginInstance* plugin_;
+
+ // The FullscreenContainer that the plugin instance can callback into.
+ scoped_ptr<pepper::FullscreenContainer> container_;
+
+ DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper);
+};
+
+#endif // CHROME_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_
« no previous file with comments | « chrome/renderer/render_widget_fullscreen.cc ('k') | chrome/renderer/render_widget_fullscreen_pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698