summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorerikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 14:57:25 +0000
committererikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 14:57:25 +0000
commitab32b16c9acd73a2f2d2a92f1e8e5083b51b3953 (patch)
treee3910fea8522ea0a6e34d30b40a0a659c4a9d93f /chrome/browser/tab_contents
parent357ff69d8564f44ffb7eb8ff3214d9cf7885dd63 (diff)
downloadchromium_src-ab32b16c9acd73a2f2d2a92f1e8e5083b51b3953.zip
chromium_src-ab32b16c9acd73a2f2d2a92f1e8e5083b51b3953.tar.gz
chromium_src-ab32b16c9acd73a2f2d2a92f1e8e5083b51b3953.tar.bz2
Popup width and height are now dynamic.
BUG=24471 TEST=none Review URL: http://codereview.chromium.org/273046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29274 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/interstitial_page.cc6
-rw-r--r--chrome/browser/tab_contents/tab_contents_view.cc4
-rw-r--r--chrome/browser/tab_contents/tab_contents_view.h2
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_mac.mm2
4 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc
index 042801a..cb6648a 100644
--- a/chrome/browser/tab_contents/interstitial_page.cc
+++ b/chrome/browser/tab_contents/interstitial_page.cc
@@ -105,7 +105,7 @@ class InterstitialPage::InterstitialPageRVHViewDelegate
const gfx::Rect& selection_rect,
int active_match_ordinal,
bool final_update);
- virtual void UpdatePreferredWidth(int pref_width);
+ virtual void UpdatePreferredSize(const gfx::Size& pref_size);
private:
InterstitialPage* interstitial_page_;
@@ -569,8 +569,8 @@ void InterstitialPage::InterstitialPageRVHViewDelegate::UpdateDragCursor(
void InterstitialPage::InterstitialPageRVHViewDelegate::GotFocus() {
}
-void InterstitialPage::InterstitialPageRVHViewDelegate::UpdatePreferredWidth(
- int pref_width) {
+void InterstitialPage::InterstitialPageRVHViewDelegate::UpdatePreferredSize(
+ const gfx::Size& pref_size) {
}
void InterstitialPage::InterstitialPageRVHViewDelegate::TakeFocus(
diff --git a/chrome/browser/tab_contents/tab_contents_view.cc b/chrome/browser/tab_contents/tab_contents_view.cc
index 99a052a..2b8ae76 100644
--- a/chrome/browser/tab_contents/tab_contents_view.cc
+++ b/chrome/browser/tab_contents/tab_contents_view.cc
@@ -23,8 +23,8 @@ void TabContentsView::RenderViewCreated(RenderViewHost* host) {
// Default implementation does nothing. Platforms may override.
}
-void TabContentsView::UpdatePreferredWidth(int pref_width) {
- preferred_width_ = pref_width;
+void TabContentsView::UpdatePreferredSize(const gfx::Size& pref_size) {
+ preferred_width_ = pref_size.width();
}
void TabContentsView::CreateNewWindow(int route_id) {
diff --git a/chrome/browser/tab_contents/tab_contents_view.h b/chrome/browser/tab_contents/tab_contents_view.h
index fcef017..db5fff8 100644
--- a/chrome/browser/tab_contents/tab_contents_view.h
+++ b/chrome/browser/tab_contents/tab_contents_view.h
@@ -123,7 +123,7 @@ class TabContentsView : public RenderViewHostDelegate::View {
virtual void HandleMouseLeave() {}
// Set and return the content's intrinsic width.
- virtual void UpdatePreferredWidth(int pref_width);
+ virtual void UpdatePreferredSize(const gfx::Size& pref_size);
int preferred_width() const {
return preferred_width_;
}
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm
index c966ee8..3740a49 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm
@@ -131,7 +131,7 @@ void TabContentsViewMac::RenderViewCreated(RenderViewHost* host) {
// We want updates whenever the intrinsic width of the webpage
// changes. Put the RenderView into that mode.
int routing_id = host->routing_id();
- host->Send(new ViewMsg_EnableIntrinsicWidthChangedMode(routing_id));
+ host->Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id));
}
void TabContentsViewMac::SetPageTitle(const std::wstring& title) {