Commit a4c34a20 authored by rafaelw@chromium.org's avatar rafaelw@chromium.org

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
parent a2c5090a
......@@ -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,6 +289,8 @@ void BrowserActionsContainer::RemoveBrowserAction(Extension* extension) {
if ((*iter)->button()->extension() == extension) {
RemoveChildView(*iter);
browser_action_views_.erase(iter);
if (GetParent())
GetParent()->SchedulePaint();
return;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment