Chromium Code Reviews| Index: ash/system/tray/tray_background_view.h |
| diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h |
| index 04294179742e0a3b4ec99b50e2853a6decbd3f9d..0c337bfb9066409ebdfb069b4317a5022ad871b1 100644 |
| --- a/ash/system/tray/tray_background_view.h |
| +++ b/ash/system/tray/tray_background_view.h |
| @@ -10,6 +10,7 @@ |
| #include "ash/ash_export.h" |
| #include "ash/shelf/shelf_background_animator_observer.h" |
| #include "ash/system/tray/actionable_view.h" |
| +#include "ash/system/tray_drag_controller.h" |
| #include "base/macros.h" |
| #include "ui/compositor/layer_animation_observer.h" |
| #include "ui/gfx/geometry/insets.h" |
| @@ -53,6 +54,12 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, |
| const override; |
| void PaintButtonContents(gfx::Canvas* canvas) override; |
| + // Dragging releated functions: |
|
msw
2017/07/12 05:04:52
Add an explanatory comment for each function, noth
minch1
2017/07/13 19:10:36
Done.
|
| + virtual bool HasBubble(); |
|
msw
2017/07/12 05:04:52
This function seems unnecessary, as callers can in
minch1
2017/07/13 19:10:36
In SystemTray, HasBubble has a little bit differen
|
| + virtual views::TrayBubbleView* GetBubbleView(); |
| + virtual void CloseBubble() {} |
| + virtual void ShowBubble() {} |
| + |
| // Called whenever the shelf alignment changes. |
| virtual void UpdateAfterShelfAlignmentChange(); |
| @@ -100,7 +107,11 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, |
| gfx::Insets GetBubbleAnchorInsets() const; |
| // Returns the container window for the bubble (on the proper display). |
| - aura::Window* GetBubbleWindowContainer() const; |
| + aura::Window* GetBubbleWindowContainer(); |
| + |
| + // Update the bounds of the tray bubbles. Close the bubble if |
|
msw
2017/07/12 05:04:52
nit: "of the associated tray bubble.", update line
minch1
2017/07/13 19:10:36
Done.
|
| + // |close_bubble| is set. |
| + void AnimateToTargetBounds(const gfx::Rect& target_bounds, bool close_bubble); |
| protected: |
| // ActionableView: |
| @@ -110,6 +121,8 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, |
| void HandlePerformActionResult(bool action_performed, |
| const ui::Event& event) override; |
| + TrayDragController* drag_controller() { return drag_controller_.get(); } |
| + |
| private: |
| class TrayWidgetObserver; |
| @@ -145,6 +158,12 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView, |
| // right of tray. |
| bool separator_visible_; |
| + std::unique_ptr<TrayDragController> drag_controller_; |
|
msw
2017/07/12 05:04:52
nit: add a comment.
minch1
2017/07/13 19:10:36
Done.
|
| + |
| + // Used in maximize mode to make sure the system tray bubble only be shown in |
| + // work area. |
| + std::unique_ptr<aura::Window> clipping_window_; |
| + |
| std::unique_ptr<TrayWidgetObserver> widget_observer_; |
| std::unique_ptr<TrayEventFilter> tray_event_filter_; |