Index: chrome/browser/ui/toolbar/toolbar_actions_bar.cc |
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar.cc b/chrome/browser/ui/toolbar/toolbar_actions_bar.cc |
index d013ae080757306176cb6822b0bd5ce0762ed996..1f76ec09677f9d680d5430074f7e73dfb108aff2 100644 |
--- a/chrome/browser/ui/toolbar/toolbar_actions_bar.cc |
+++ b/chrome/browser/ui/toolbar/toolbar_actions_bar.cc |
@@ -35,7 +35,6 @@ |
#include "extensions/browser/extension_util.h" |
#include "extensions/browser/runtime_data.h" |
#include "extensions/common/extension.h" |
-#include "extensions/common/feature_switch.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/gfx/image/image_skia.h" |
@@ -90,10 +89,7 @@ bool ToolbarActionsBar::disable_animations_for_testing_ = false; |
ToolbarActionsBar::PlatformSettings::PlatformSettings() |
: item_spacing(GetLayoutConstant(TOOLBAR_STANDARD_SPACING)), |
- icons_per_overflow_menu_row(1), |
- chevron_enabled(!extensions::FeatureSwitch::extension_action_redesign()-> |
- IsEnabled()) { |
-} |
+ icons_per_overflow_menu_row(1) {} |
ToolbarActionsBar::ToolbarActionsBar(ToolbarActionsBarDelegate* delegate, |
Browser* browser, |
@@ -267,8 +263,7 @@ bool ToolbarActionsBar::NeedsOverflow() const { |
// popped out action (because the action will pop back into overflow when the |
// menu opens). |
return GetEndIndexInBounds() != toolbar_actions_.size() || |
- (is_drag_in_progress_ && !platform_settings_.chevron_enabled) || |
- (popped_out_action_ && !is_popped_out_sticky_); |
+ is_drag_in_progress_ || (popped_out_action_ && !is_popped_out_sticky_); |
} |
gfx::Rect ToolbarActionsBar::GetFrameForIndex( |
@@ -514,7 +509,7 @@ void ToolbarActionsBar::PopOutAction(ToolbarActionViewController* controller, |
delegate_->Redraw(true); |
} |
- ResizeDelegate(gfx::Tween::LINEAR, false); |
+ ResizeDelegate(gfx::Tween::LINEAR); |
if (!delegate_->IsAnimating()) { |
// Don't call the closure re-entrantly. |
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure); |
@@ -532,7 +527,7 @@ void ToolbarActionsBar::UndoPopOut() { |
popped_out_closure_.Reset(); |
if (!IsActionVisibleOnMainBar(controller)) |
delegate_->Redraw(true); |
- ResizeDelegate(gfx::Tween::LINEAR, false); |
+ ResizeDelegate(gfx::Tween::LINEAR); |
} |
void ToolbarActionsBar::SetPopupOwner( |
@@ -633,15 +628,12 @@ void ToolbarActionsBar::OnToolbarActionAdded( |
model_->CreateActionForItem(browser_, this, item)); |
delegate_->AddViewForAction(toolbar_actions_[index].get(), index); |
- // We may need to resize (e.g. to show the new icon, or the chevron). We don't |
- // need to check if an extension is upgrading here, because ResizeDelegate() |
- // checks to see if the container is already the proper size, and because |
- // if the action is newly incognito enabled, even though it's a reload, it's |
- // a new extension to this toolbar. |
- // We suppress the chevron during animation because, if we're expanding to |
- // show a new icon, we don't want to have the chevron visible only for the |
- // duration of the animation. |
- ResizeDelegate(gfx::Tween::LINEAR, true); |
+ // We may need to resize (e.g. to show the new icon). We don't need to check |
+ // if an extension is upgrading here, because ResizeDelegate() checks to see |
+ // if the container is already the proper size, and because if the action is |
+ // newly incognito enabled, even though it's a reload, it's a new extension to |
+ // this toolbar. |
+ ResizeDelegate(gfx::Tween::LINEAR); |
} |
void ToolbarActionsBar::OnToolbarActionRemoved(const std::string& action_id) { |
@@ -681,7 +673,7 @@ void ToolbarActionsBar::OnToolbarActionRemoved(const std::string& action_id) { |
} else { |
// Either we went from overflow to no-overflow, or we shrunk the no- |
// overflow container by 1. Either way the size changed, so animate. |
- ResizeDelegate(gfx::Tween::EASE_OUT, false); |
+ ResizeDelegate(gfx::Tween::EASE_OUT); |
} |
} |
} |
@@ -704,11 +696,10 @@ void ToolbarActionsBar::OnToolbarActionUpdated(const std::string& action_id) { |
} |
void ToolbarActionsBar::OnToolbarVisibleCountChanged() { |
- ResizeDelegate(gfx::Tween::EASE_OUT, false); |
+ ResizeDelegate(gfx::Tween::EASE_OUT); |
} |
-void ToolbarActionsBar::ResizeDelegate(gfx::Tween::Type tween_type, |
- bool suppress_chevron) { |
+void ToolbarActionsBar::ResizeDelegate(gfx::Tween::Type tween_type) { |
int desired_width = GetFullSize().width(); |
if (desired_width != |
delegate_->GetWidth(ToolbarActionsBarDelegate::GET_WIDTH_CURRENT)) { |
@@ -782,7 +773,7 @@ void ToolbarActionsBar::OnToolbarModelInitialized() { |
tracked_objects::ScopedTracker tracking_profile( |
FROM_HERE_WITH_EXPLICIT_FUNCTION( |
"ToolbarActionsBar::OnToolbarModelInitialized")); |
- ResizeDelegate(gfx::Tween::EASE_OUT, false); |
+ ResizeDelegate(gfx::Tween::EASE_OUT); |
} |
void ToolbarActionsBar::TabInsertedAt(TabStripModel* tab_strip_model, |
@@ -807,7 +798,7 @@ void ToolbarActionsBar::ReorderActions() { |
// Our visible browser actions may have changed - re-Layout() and check the |
// size (if we aren't suppressing the layout). |
if (!suppress_layout_) { |
- ResizeDelegate(gfx::Tween::EASE_OUT, false); |
+ ResizeDelegate(gfx::Tween::EASE_OUT); |
delegate_->Redraw(true); |
} |
} |