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

Unified Diff: trunk/src/chrome/browser/ui/views/toolbar/browser_actions_container.cc

Issue 314803002: Revert 274606 "Temporarily re-enabling SizeAfterPrefChange test ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | « trunk/src/chrome/browser/extensions/extension_toolbar_model_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/browser/ui/views/toolbar/browser_actions_container.cc
===================================================================
--- trunk/src/chrome/browser/ui/views/toolbar/browser_actions_container.cc (revision 274622)
+++ trunk/src/chrome/browser/ui/views/toolbar/browser_actions_container.cc (working copy)
@@ -184,8 +184,6 @@
if (browser_action_views_[i]->visible())
++visible_actions;
}
- VLOG(4) << "BAC::VisibleBrowserActions() returns " << visible_actions
- << " with size=" << browser_action_views_.size();
return visible_actions;
}
@@ -674,13 +672,10 @@
#endif
CloseOverflowMenu();
- if (!ShouldDisplayBrowserAction(extension)) {
- VLOG(4) << "Should not display: " << extension->name().c_str();
+ if (!ShouldDisplayBrowserAction(extension))
return;
- }
size_t visible_actions = VisibleBrowserActions();
- VLOG(4) << "Got back " << visible_actions << " visible.";
// Add the new browser action to the vector and the view hierarchy.
if (profile_->IsOffTheRecord())
@@ -690,21 +685,17 @@
AddChildViewAt(view, index);
// If we are still initializing the container, don't bother animating.
- if (!model_->extensions_initialized()) {
- VLOG(4) << "Still initializing";
+ if (!model_->extensions_initialized())
return;
- }
// Enlarge the container if it was already at maximum size and we're not in
// the middle of upgrading.
if ((model_->GetVisibleIconCount() < 0) &&
!extensions::ExtensionSystem::Get(profile_)->runtime_data()->
IsBeingUpgraded(extension)) {
- VLOG(4) << "At max, Save and animate";
suppress_chevron_ = true;
SaveDesiredSizeAndAnimate(gfx::Tween::LINEAR, visible_actions + 1);
} else {
- VLOG(4) << "Not at max";
// Just redraw the (possibly modified) visible icon set.
OnBrowserActionVisibilityChanged();
}
@@ -880,12 +871,9 @@
// NOTE: Don't save the icon count in incognito because there may be fewer
// icons in that mode. The result is that the container in a normal window is
// always at least as wide as in an incognito window.
- if (!profile_->IsOffTheRecord()) {
+ if (!profile_->IsOffTheRecord())
model_->SetVisibleIconCount(num_visible_icons);
- VLOG(4) << "Setting visible count: " << num_visible_icons;
- } else {
- VLOG(4) << "|Skipping| setting visible count: " << num_visible_icons;
- }
+
int target_size = IconCountToWidth(num_visible_icons,
num_visible_icons < browser_action_views_.size());
if (!disable_animations_during_testing_) {
« no previous file with comments | « trunk/src/chrome/browser/extensions/extension_toolbar_model_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698