Fix window zoom in a sane way, remove nasty casts.
BUG=110208, 104170
TEST=window zoom should work, as in bug 104170
Review URL: http://codereview.chromium.org/9215002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117802 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index b2aec15..8ea6a1f 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -764,6 +764,7 @@
}
void TabContents::UpdatePreferredSize(const gfx::Size& pref_size) {
+ preferred_size_ = pref_size;
if (delegate_)
delegate_->UpdatePreferredSize(this, pref_size);
}
@@ -1059,6 +1060,10 @@
return maximum_zoom_percent_;
}
+gfx::Size TabContents::GetPreferredSize() const {
+ return preferred_size_;
+}
+
int TabContents::GetContentRestrictions() const {
return content_restrictions_;
}