diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-04 22:53:14 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-04 22:53:14 +0000 |
commit | a572098730e9e2c355b4f99a8d7087a5b1e64b1b (patch) | |
tree | c4037b7a87256995e13c0d6678f850ae1765d8fa /chrome/browser/extensions/extension_view.cc | |
parent | 3a740b30a7ada4266cae5a1a5658e850dd663e22 (diff) | |
download | chromium_src-a572098730e9e2c355b4f99a8d7087a5b1e64b1b.zip chromium_src-a572098730e9e2c355b4f99a8d7087a5b1e64b1b.tar.gz chromium_src-a572098730e9e2c355b4f99a8d7087a5b1e64b1b.tar.bz2 |
Several minor visual fixes to toolstrips:
* Layout toolstrips on the left of the bookmark bar so that
something always obviously happens when you install one.
This is in response to some feedback I've gotten demoing
toolstrips for various people.
* Open the NTP on install if the bookmarkbar isn't visible.
Again, I'm trying to make something happen when you
install an extension. This won't be the permanent behavior
but it seems like doing nothing if you have your bookmark
bar detached is likely to confuse people.
* Fix a bug where we kept trying to resize the toolstrip
back to the width it had when it was first made visible.
* Fix a bug where we didn't always repaint the bookmarkbar
after the toolstrip preferred width changed.
This also seems to fix the issue where the buildbot sample
shows up overlayed on top of tab contents, though I didn't
mean to fix that with this CL.
Review URL: http://codereview.chromium.org/100310
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15249 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_view.cc')
-rwxr-xr-x | chrome/browser/extensions/extension_view.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extension_view.cc b/chrome/browser/extensions/extension_view.cc index 5678e08..3f602d0 100755 --- a/chrome/browser/extensions/extension_view.cc +++ b/chrome/browser/extensions/extension_view.cc @@ -50,7 +50,7 @@ void ExtensionView::DidChangeBounds(const gfx::Rect& previous, void ExtensionView::ShowIfCompletelyLoaded() { // We wait to show the ExtensionView until it has loaded and our parent has // given us a background. These can happen in different orders. - if (host_->did_stop_loading() && render_view_host()->view() && + if (!IsVisible() && host_->did_stop_loading() && render_view_host()->view() && !render_view_host()->view()->background().empty()) { SetVisible(true); DidContentsPreferredWidthChange(pending_preferred_width_); @@ -71,7 +71,7 @@ void ExtensionView::DidContentsPreferredWidthChange(const int pref_width) { // Size changes will not be honored by lower layers while we are hidden. if (!IsVisible()) { pending_preferred_width_ = pref_width; - } else if (pref_width > 0) { + } else if (pref_width > 0 && pref_width != GetPreferredSize().width()) { set_preferred_size(gfx::Size(pref_width, height())); SizeToPreferredSize(); @@ -81,9 +81,8 @@ void ExtensionView::DidContentsPreferredWidthChange(const int pref_width) { // containment hierarchy. if (GetParent() != NULL && GetParent()->GetParent() != NULL) { GetParent()->GetParent()->Layout(); + GetParent()->GetParent()->SchedulePaint(); } - - SchedulePaint(); } } |