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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_gtk.h

Issue 6462017: gtk: Improve fullscreen RenderWidgetHostViewGtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update a comment Created 9 years, 10 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
Index: chrome/browser/renderer_host/render_widget_host_view_gtk.h
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.h b/chrome/browser/renderer_host/render_widget_host_view_gtk.h
index 40ffe6640b42cbd677ad0af5ccf31d83369c98af..b354a7ba4dd933ff12c91ec6d48d497b5286883f 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.h
@@ -54,7 +54,7 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView,
// RenderWidgetHostView implementation.
virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
const gfx::Rect& pos);
- virtual void InitAsFullscreen(RenderWidgetHostView* parent_host_view);
+ virtual void InitAsFullscreen();
virtual RenderWidgetHost* GetRenderWidgetHost() const;
virtual void DidBecomeSelected();
virtual void WasHidden();
@@ -128,18 +128,18 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView,
// Returns whether this render view is a popup (<select> dropdown or
// autocomplete window).
- bool IsPopup();
+ bool IsPopup() const;
+
+ // Do initialization needed by all InitAs*() methods.
+ void DoSharedInit();
+
+ // Do initialization needed just by InitAsPopup() and InitAsFullscreen().
+ // We move and resize |window| to |bounds| and show it and its contents.
+ void DoPopupOrFullscreenInit(GtkWindow* window, const gfx::Rect& bounds);
// Update the display cursor for the render view.
void ShowCurrentCursor();
- // Helper method for InitAsPopup() and InitAsFullscreen().
- void DoInitAsPopup(
- RenderWidgetHostView* parent_host_view,
- GtkWindowType window_type,
- const gfx::Rect& pos, // Ignored if is_fullscreen is true.
- bool is_fullscreen);
-
// The model object.
RenderWidgetHost* host_;
@@ -159,6 +159,7 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView,
// Whether we are currently loading.
bool is_loading_;
+
// The cursor for the page. This is passed up from the renderer.
WebCursor current_cursor_;
@@ -181,14 +182,10 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView,
// value affects the alpha we use for |overlay_color_|.
ui::SlideAnimation overlay_animation_;
- // Variables used only for popups --------------------------------------------
- // Our parent widget.
- RenderWidgetHostView* parent_host_view_;
- // The native view of our parent, equivalent to
- // parent_host_view_->GetNativeView().
+ // The native view of our parent widget. Used only for popups.
GtkWidget* parent_;
- // We ignore the first mouse release on popups. This allows the popup to
- // stay open.
+
+ // We ignore the first mouse release on popups so the popup will remain open.
bool is_popup_first_mouse_release_;
// Whether or not this widget was focused before shadowed by another widget.
@@ -200,6 +197,9 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView,
// for extension popups.
bool do_x_grab_;
+ // Is the widget fullscreen?
+ bool is_fullscreen_;
+
// A convenience wrapper object for GtkIMContext;
scoped_ptr<GtkIMContextWrapper> im_context_;

Powered by Google App Engine
This is Rietveld 408576698