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

Side by Side Diff: chrome/browser/ui/toolbar/toolbar_actions_bar.h

Issue 1782223002: [Extensions UI] Update ToolbarActionsBar::NeedsOverflow() for popped out actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finnur's Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 DragType drag_type); 179 DragType drag_type);
180 180
181 // Notifies the ToolbarActionsBar that the delegate finished animating. 181 // Notifies the ToolbarActionsBar that the delegate finished animating.
182 void OnAnimationEnded(); 182 void OnAnimationEnded();
183 183
184 // Returns true if the given |action| is visible on the main toolbar. 184 // Returns true if the given |action| is visible on the main toolbar.
185 bool IsActionVisibleOnMainBar(const ToolbarActionViewController* action) 185 bool IsActionVisibleOnMainBar(const ToolbarActionViewController* action)
186 const; 186 const;
187 187
188 // Pops out a given |action|, ensuring it is visible. 188 // Pops out a given |action|, ensuring it is visible.
189 // |is_sticky| refers to whether or not the action will stay popped out if
190 // the overflow menu is opened.
189 // |closure| will be called once any animation is complete. 191 // |closure| will be called once any animation is complete.
190 void PopOutAction(ToolbarActionViewController* action, 192 void PopOutAction(ToolbarActionViewController* action,
193 bool is_sticky,
191 const base::Closure& closure); 194 const base::Closure& closure);
192 195
193 // Undoes the current "pop out"; i.e., moves the popped out action back into 196 // Undoes the current "pop out"; i.e., moves the popped out action back into
194 // overflow. 197 // overflow.
195 void UndoPopOut(); 198 void UndoPopOut();
196 199
197 // Sets the active popup owner to be |popup_owner|. 200 // Sets the active popup owner to be |popup_owner|.
198 void SetPopupOwner(ToolbarActionViewController* popup_owner); 201 void SetPopupOwner(ToolbarActionViewController* popup_owner);
199 202
200 // Hides the actively showing popup, if any. 203 // Hides the actively showing popup, if any.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // be displayed, and, if there is, shown that bubble. 321 // be displayed, and, if there is, shown that bubble.
319 bool checked_extension_bubble_; 322 bool checked_extension_bubble_;
320 323
321 // Whether or not the user is in the middle of a drag-and-drop operation. 324 // Whether or not the user is in the middle of a drag-and-drop operation.
322 bool is_drag_in_progress_; 325 bool is_drag_in_progress_;
323 326
324 // The action, if any, which is currently "popped out" of the overflow in 327 // The action, if any, which is currently "popped out" of the overflow in
325 // order to show a popup. 328 // order to show a popup.
326 ToolbarActionViewController* popped_out_action_; 329 ToolbarActionViewController* popped_out_action_;
327 330
331 // True if the popped out action is "sticky", meaning it will stay popped
332 // out even if another menu is opened.
333 bool is_popped_out_sticky_;
334
328 // The task to alert the |popped_out_action_| that animation has finished, and 335 // The task to alert the |popped_out_action_| that animation has finished, and
329 // it is fully popped out. 336 // it is fully popped out.
330 base::Closure popped_out_closure_; 337 base::Closure popped_out_closure_;
331 338
332 // The controller of the bubble to show once animation finishes, if any. 339 // The controller of the bubble to show once animation finishes, if any.
333 scoped_ptr<extensions::ExtensionMessageBubbleController> 340 scoped_ptr<extensions::ExtensionMessageBubbleController>
334 pending_extension_bubble_controller_; 341 pending_extension_bubble_controller_;
335 342
336 base::ObserverList<ToolbarActionsBarObserver> observers_; 343 base::ObserverList<ToolbarActionsBarObserver> observers_;
337 344
338 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_; 345 base::WeakPtrFactory<ToolbarActionsBar> weak_ptr_factory_;
339 346
340 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar); 347 DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBar);
341 }; 348 };
342 349
343 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_ 350 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698