Revert of Remove OneClickSigninHelper since it is no longer used. (patchset #5 id...
[chromium-blink-merge.git] / chrome / browser / ui / toolbar / toolbar_actions_bar_delegate.h
blob9a24e6dc3faf6cd7f733779be25cd725d2ea9405
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_
8 #include "ui/gfx/animation/tween.h"
9 #include "ui/gfx/geometry/size.h"
11 class ToolbarActionViewController;
13 // The delegate class (which, in production, represents the view) of the
14 // ToolbarActionsBar.
15 class ToolbarActionsBarDelegate {
16 public:
17 virtual ~ToolbarActionsBarDelegate() {}
19 // Adds a view for the given |action| at |index|.
20 virtual void AddViewForAction(ToolbarActionViewController* action,
21 size_t index) = 0;
23 // Removes the view for the given |action|.
24 virtual void RemoveViewForAction(ToolbarActionViewController* action) = 0;
26 // Removes all action views.
27 virtual void RemoveAllViews() = 0;
29 // Redraws the view for the toolbar actions bar. |order_changed| indicates
30 // whether or not the change caused a reordering of the actions.
31 virtual void Redraw(bool order_changed) = 0;
33 // Resizes the view to the |target_width| and animates with the given
34 // |tween_type|. |suppress_chevron| indicates if the chevron should not be
35 // shown during the animation.
36 virtual void ResizeAndAnimate(gfx::Tween::Type tween_type,
37 int target_width,
38 bool suppress_chevron) = 0;
40 // Sets the overflow chevron's visibility.
41 virtual void SetChevronVisibility(bool chevron_visible) = 0;
43 // Returns the current width of the view.
44 virtual int GetWidth() const = 0;
46 // Returns true if the view is animating.
47 virtual bool IsAnimating() const = 0;
49 // Stops the current animation (width remains where it currently is).
50 virtual void StopAnimating() = 0;
52 // Returns the width (including padding) for the overflow chevron.
53 virtual int GetChevronWidth() const = 0;
55 // Returns true if there is currently a popup running.
56 virtual bool IsPopupRunning() const = 0;
58 // Notifies the delegate that the value of whether or not any overflowed
59 // action wants to run has changed.
60 virtual void OnOverflowedActionWantsToRunChanged(
61 bool overflowed_action_wants_to_run) = 0;
64 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_