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

Unified Diff: content/browser/renderer_host/render_view_host.cc

Issue 9517010: Change panels to be able to turn off autoresize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix assert at the end of RenderWidget::Resize which fixes the tests on OSX. Created 8 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: content/browser/renderer_host/render_view_host.cc
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index 8d951e1d1c11392a3ba3cf14366ca885a37347ef..e28ee0259b0ede15e80eb35e9706027175d6b7e1 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -1108,7 +1108,7 @@ void RenderViewHost::OnMsgDidContentsPreferredSizeChange(
}
void RenderViewHost::OnRenderAutoResized(const gfx::Size& new_size) {
- delegate_->UpdatePreferredSize(new_size);
+ delegate_->ResizeDueToAutoResize(new_size);
}
void RenderViewHost::OnMsgDidChangeScrollbarsForMainFrame(
@@ -1432,6 +1432,11 @@ void RenderViewHost::EnableAutoResize(const gfx::Size& min_size,
Send(new ViewMsg_EnableAutoResize(routing_id(), min_size, max_size));
}
+void RenderViewHost::DisableAutoResize(const gfx::Size& new_size) {
+ SetShouldAutoResize(false);
+ Send(new ViewMsg_DisableAutoResize(routing_id(), new_size));
+}
+
void RenderViewHost::ExecuteCustomContextMenuCommand(
int action, const content::CustomContextMenuContext& context) {
Send(new ViewMsg_CustomContextMenuAction(routing_id(), context, action));
« no previous file with comments | « content/browser/renderer_host/render_view_host.h ('k') | content/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698