Chromium Code Reviews| Index: ash/common/system/tray/tray_background_view.h |
| diff --git a/ash/common/system/tray/tray_background_view.h b/ash/common/system/tray/tray_background_view.h |
| index 741417400d92b36e94da1bf267be46326569fde2..1d26bc5d847eec5a9c3575a4f255cec63dff54b1 100644 |
| --- a/ash/common/system/tray/tray_background_view.h |
| +++ b/ash/common/system/tray/tray_background_view.h |
| @@ -24,7 +24,7 @@ class WmShelf; |
| // Base class for children of StatusAreaWidget: SystemTray, WebNotificationTray, |
| // LogoutButtonTray, OverviewButtonTray. |
| // This class handles setting and animating the background when the Launcher |
| -// his shown/hidden. It also inherits from ActionableView so that the tray |
| +// is shown/hidden. It also inherits from ActionableView so that the tray |
| // items can override PerformAction when clicked on. |
| class ASH_EXPORT TrayBackgroundView : public ActionableView, |
| public ui::ImplicitAnimationObserver, |
| @@ -65,7 +65,7 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, |
| DISALLOW_COPY_AND_ASSIGN(TrayContainer); |
| }; |
| - explicit TrayBackgroundView(WmShelf* wm_shelf); |
| + TrayBackgroundView(WmShelf* wm_shelf); |
| ~TrayBackgroundView() override; |
| // Called after the tray has been added to the widget containing it. |
| @@ -80,6 +80,7 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, |
| void ChildPreferredSizeChanged(views::View* child) override; |
| void GetAccessibleState(ui::AXViewState* state) override; |
| void AboutToRequestFocusFromTabTraversal(bool reverse) override; |
| + void OnPaint(gfx::Canvas* canvas) override; |
| // ActionableView: |
| bool PerformAction(const ui::Event& event) override; |
| @@ -138,13 +139,17 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, |
| // ShelfBackgroundAnimatorObserver: |
| void UpdateShelfItemBackground(int alpha) override; |
| + // Updates the visibility of this tray's separator. |
| + void SetSeparatorVisibility(bool is_show); |
| + |
| + protected: |
| + // In the given |canvas|, draws a 1x32px separator line and it is 4 pixel to |
|
varkha
2016/08/18 16:33:24
nit: no need for "and it is".
|
| + // the right of the TrayBackgroundView. |
| + void DrawSeparator(gfx::Canvas* canvas); |
|
yoshiki
2016/08/18 08:39:08
Is this method declaration necessary? I can't find
yiyix
2016/08/18 20:01:43
Good catch! Thank you! I had this function from on
|
| + |
| private: |
| class TrayWidgetObserver; |
| - // Called from Initialize after all status area trays have been created. |
| - // Sets the border based on the position of the view. |
| - void SetTrayBorder(); |
| - |
| // ui::ImplicitAnimationObserver: |
| void OnImplicitAnimationsCompleted() override; |
| bool RequiresNotificationWhenAnimatorDestroyed() const override; |
| @@ -170,6 +175,7 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, |
| // differently if set to true. |
| bool draw_background_as_active_; |
| + bool is_separator_visible_; |
|
yoshiki
2016/08/18 08:39:08
nit: could you add a brief comment for this member
yiyix
2016/08/18 20:01:43
Done.
|
| std::unique_ptr<TrayWidgetObserver> widget_observer_; |
| std::unique_ptr<TrayEventFilter> tray_event_filter_; |