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

Unified Diff: content/browser/renderer_host/render_widget_host.h

Issue 8704005: Add autoresize capability to chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Standardize on resize everywhere. Created 9 years 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: content/browser/renderer_host/render_widget_host.h
diff --git a/content/browser/renderer_host/render_widget_host.h b/content/browser/renderer_host/render_widget_host.h
index be4d693c2d0850adc2811d8f4d21bf0834981b98..3383b97a64f314bbbef98f1008478318ab308d00 100644
--- a/content/browser/renderer_host/render_widget_host.h
+++ b/content/browser/renderer_host/render_widget_host.h
@@ -496,6 +496,9 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Listener,
virtual void NotifyRendererUnresponsive() {}
virtual void NotifyRendererResponsive() {}
+ // Called when auto-resize resulted in the renderer size changing.
+ virtual void OnRenderAutoResized(const gfx::Size& new_size) {}
+
// ---------------------------------------------------------------------------
// RenderViewHost overrides this method to impose further restrictions on when
@@ -510,6 +513,10 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Listener,
// RenderViewHost overrides this method to report when in fullscreen mode.
virtual bool IsFullscreen() const;
+ // Indicates if the render widget host should track the render widget's size
+ // as opposed to visa versa.
+ void SetShouldAutoResize(bool enable);
+
protected:
// true if a renderer has once been valid. We use this flag to display a sad
// tab only when we lose our renderer and not if a paint occurs during
@@ -674,6 +681,10 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Listener,
// hand is updated when the resize message is sent.
gfx::Rect in_flight_reserved_rect_;
+ // True if the render widget host should track the render widget's size as
+ // opposed to visa versa.
+ bool should_auto_resize_;
+
// True if a mouse move event was sent to the render view and we are waiting
// for a corresponding ViewHostMsg_HandleInputEvent_ACK message.
bool mouse_move_pending_;
« no previous file with comments | « content/browser/renderer_host/render_view_host.cc ('k') | content/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698