summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_host.cc
diff options
context:
space:
mode:
authorlevin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 23:07:03 +0000
committerlevin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 23:07:03 +0000
commit3060ce78db15f4a923d949ab5c1aaa5f75a1a066 (patch)
treefd5cc29e1927d7191448963099afce23ecc3f35d /chrome/browser/extensions/extension_host.cc
parentd5e28a3e5402329a9f50075ed8d6417feeea7c71 (diff)
downloadchromium_src-3060ce78db15f4a923d949ab5c1aaa5f75a1a066.zip
chromium_src-3060ce78db15f4a923d949ab5c1aaa5f75a1a066.tar.gz
chromium_src-3060ce78db15f4a923d949ab5c1aaa5f75a1a066.tar.bz2
Move extension pop-ups and notifications to the new auto-resize code.
This should fix the "flicker" issues where autosize ends up flipping back and forth between two size in rapid succession. The change in render_widget_host is needed to avoid cases where the OnMsgUpdateRect happens while processing a resize message which may result in recursion back into the resize code which is undesirable. BUG=58816,56693 TEST=Try out auto resize in notifications and extensions. Best to do with windows that change size and hit the maximum as well as minimum sizes on the 3 desktop platforms for pop-ups. Review URL: http://codereview.chromium.org/9702068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127824 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_host.cc')
-rw-r--r--chrome/browser/extensions/extension_host.cc16
1 files changed, 3 insertions, 13 deletions
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 71c7442..803c562 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -293,10 +293,10 @@ void ExtensionHost::Observe(int type,
}
}
-void ExtensionHost::UpdatePreferredSize(WebContents* source,
- const gfx::Size& pref_size) {
+void ExtensionHost::ResizeDueToAutoResize(WebContents* source,
+ const gfx::Size& new_size) {
if (view_.get())
- view_->UpdatePreferredSize(pref_size);
+ view_->ResizeDueToAutoResize(new_size);
}
void ExtensionHost::RenderViewGone(base::TerminationStatus status) {
@@ -334,11 +334,6 @@ void ExtensionHost::InsertInfobarCSS() {
render_view_host()->InsertCSS(string16(), css.as_string());
}
-void ExtensionHost::DisableScrollbarsForSmallWindows(
- const gfx::Size& size_limit) {
- render_view_host()->DisableScrollbarsForThreshold(size_limit);
-}
-
void ExtensionHost::DidStopLoading() {
bool notify = !did_stop_loading_;
did_stop_loading_ = true;
@@ -485,11 +480,6 @@ void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) {
if (view_.get())
view_->RenderViewCreated();
- if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP ||
- extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR) {
- render_view_host->EnablePreferredSizeMode();
- }
-
// If the host is bound to a browser, then extract its window id.
// Extensions hosted in ExternalTabContainer objects may not have
// an associated browser.