Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4395)

Unified Diff: chrome/browser/views/browser_actions_container.cc

Issue 341015: Fix paint glitch on load/unload browser action (Closed)
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/browser_actions_container.cc
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc
index 414e6e9f1e536e52e347f14765562c43ca530b09..92e541afe0a979bcc53f55beb40f84ba864a712d 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() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698