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

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

Issue 1105713002: [Extension Toolbar] Slide out overflowed actions for popups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 8 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
Index: chrome/browser/ui/views/toolbar/browser_actions_container.cc
diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.cc b/chrome/browser/ui/views/toolbar/browser_actions_container.cc
index 8e7977c99c986bc17a6d6b3407fd8b5480b761ea..c8359c770e1401f1d0fa40bdbda73afc9e13b4ac 100644
--- a/chrome/browser/ui/views/toolbar/browser_actions_container.cc
+++ b/chrome/browser/ui/views/toolbar/browser_actions_container.cc
@@ -207,7 +207,6 @@ void BrowserActionsContainer::AddViewForAction(
if (chevron_)
chevron_->CloseMenu();
- view_controller->GetActionName();
ToolbarActionView* view =
new ToolbarActionView(view_controller, browser_->profile(), this);
toolbar_action_views_.insert(toolbar_action_views_.begin() + index, view);
@@ -241,7 +240,7 @@ void BrowserActionsContainer::Redraw(bool order_changed) {
}
std::vector<ToolbarActionViewController*> actions =
- toolbar_actions_bar_->toolbar_actions();
+ toolbar_actions_bar_->GetActions();
if (order_changed) {
// Run through the views and compare them to the desired order. If something
// is out of place, find the correct spot for it.
@@ -422,7 +421,7 @@ void BrowserActionsContainer::Layout() {
// The range of visible icons, from start_index (inclusive) to end_index
// (exclusive).
size_t start_index = in_overflow_mode() ?
- main_container_->toolbar_actions_bar_->GetIconCount() : 0u;
+ toolbar_action_views_.size() - toolbar_actions_bar_->GetIconCount() : 0u;
// For the main container's last visible icon, we calculate how many icons we
// can display with the given width. We add an extra item_spacing because the
// last icon doesn't need padding, but we want it to divide easily.
@@ -681,6 +680,8 @@ void BrowserActionsContainer::AnimationEnded(const gfx::Animation* animation) {
observers_,
OnBrowserActionsContainerAnimationEnded());
+ toolbar_actions_bar_->OnAnimationEnded();
+
if (pending_extension_bubble_controller_)
ShowExtensionMessageBubble(pending_extension_bubble_controller_.Pass());
}
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698