summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-28 01:54:12 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-28 01:54:12 +0000
commita4c34a20c8b0a2fae699edbacf1e82655dab147f (patch)
treebab4d0bab67cacd5d36315380252f1fb0fa0b67b
parenta2c5090a2303e4da527ca194d06439b6177f0cc2 (diff)
downloadchromium_src-a4c34a20c8b0a2fae699edbacf1e82655dab147f.zip
chromium_src-a4c34a20c8b0a2fae699edbacf1e82655dab147f.tar.gz
chromium_src-a4c34a20c8b0a2fae699edbacf1e82655dab147f.tar.bz2
Fix paint glitch on load/unload browser action.
This asks the toolbar (BrowserActionContainer.GetParent()) to paint when a browser action view has been added & removed. TEST=Load browser action. Go to chrome://extensions, click "reload". The omnibar should visibly flash large & small as the browser action is loaded and unload, but it should not leave behind any visible "cruft" around the browser action. BUG=24642 Review URL: http://codereview.chromium.org/341015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30310 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/browser_actions_container.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index 414e6e9..92e541a 100644
--- a/chrome/browser/views/browser_actions_container.cc
+++ b/chrome/browser/views/browser_actions_container.cc
@@ -275,6 +275,8 @@ void BrowserActionsContainer::AddBrowserAction(Extension* extension) {
BrowserActionView* view = new BrowserActionView(extension, this);
browser_action_views_.push_back(view);
AddChildView(view);
+ if (GetParent())
+ GetParent()->SchedulePaint();
}
void BrowserActionsContainer::RemoveBrowserAction(Extension* extension) {
@@ -287,11 +289,13 @@ void BrowserActionsContainer::RemoveBrowserAction(Extension* extension) {
if ((*iter)->button()->extension() == extension) {
RemoveChildView(*iter);
browser_action_views_.erase(iter);
+ if (GetParent())
+ GetParent()->SchedulePaint();
return;
}
}
- NOTREACHED() << "Asked to remove a browser action view that doesn't exist.";
+ NOTREACHED() << "Asked to remove a browser action view that doesn't exist.";
}
void BrowserActionsContainer::DeleteBrowserActionViews() {