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

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

Issue 276033: [chromium-reviews] Fix bug: browser action button disappears when loading a new extension. This ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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/toolbar_view.cc
===================================================================
--- chrome/browser/views/toolbar_view.cc (revision 28628)
+++ chrome/browser/views/toolbar_view.cc (working copy)
@@ -552,6 +552,16 @@
int next_menu_x = go_->x() + go_->width() + kMenuButtonOffset;
browser_actions_->SetBounds(next_menu_x, 0, browser_actions_width, height());
+
+ // The browser action needs to do a layout explicitly, because when an
+ // extension is loaded/unloaded/changed, BrowserActionContainer removes and
+ // re-adds everything, regardless of whether it has a page action. For a
+ // page action, browser action bounds do not change, as a result of which
+ // SetBounds does not do a layout at all.
+ // TODO(sidchat): Rework the above bahavior so that explicit layout is not
+ // required.
+ browser_actions_->Layout();
+
next_menu_x += browser_actions_width;
if (bookmark_menu_) {
« 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