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

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

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_view_host.cc
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index 69bdae5505171d0f9a1811f3a952adadd3e4d8d1..e03b6fa567da1a54c308c04decf258265e61c39b 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -1023,6 +1023,10 @@ void RenderViewHost::OnMsgDidContentsPreferredSizeChange(
delegate_->UpdatePreferredSize(new_size);
}
+void RenderViewHost::OnRenderAutoResized(const gfx::Size& new_size) {
+ delegate_->UpdatePreferredSize(new_size);
+}
+
void RenderViewHost::OnMsgDidChangeScrollbarsForMainFrame(
bool has_horizontal_scrollbar, bool has_vertical_scrollbar) {
if (view())
@@ -1339,6 +1343,12 @@ void RenderViewHost::EnablePreferredSizeMode() {
Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id()));
}
+void RenderViewHost::EnableAutoResize(const gfx::Size& min_size,
+ const gfx::Size& max_size) {
+ SetShouldAutoResize(true);
+ Send(new ViewMsg_EnableAutoResize(routing_id(), min_size, max_size));
+}
+
void RenderViewHost::ExecuteCustomContextMenuCommand(
int action, const webkit_glue::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.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698