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

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: latest update Created 9 years, 1 month 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 03d8426e52a1e4237c33b1cb7c1cc555ef6daf17..3fa66599a66068623dfa6e2e9c69c5ad6e25d99e 100644
--- a/content/browser/renderer_host/render_widget_host.h
+++ b/content/browser/renderer_host/render_widget_host.h
@@ -495,6 +495,9 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Listener,
virtual void NotifyRendererUnresponsive() {}
virtual void NotifyRendererResponsive() {}
+ // Called when auto-size resulted in the render size changing.
+ virtual void OnRenderSizeChanged(const gfx::Size& size) {}
+
// ---------------------------------------------------------------------------
// RenderViewHost overrides this method to impose further restrictions on when
@@ -509,6 +512,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 setShouldAutoSize(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
@@ -673,6 +680,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_size_;
+
// 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_;

Powered by Google App Engine
This is Rietveld 408576698