| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ | 5 #ifndef ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ |
| 6 #define ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ | 6 #define ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 DISALLOW_COPY_AND_ASSIGN(TrayContainer); | 62 DISALLOW_COPY_AND_ASSIGN(TrayContainer); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 explicit TrayBackgroundView(StatusAreaWidget* status_area_widget); | 65 explicit TrayBackgroundView(StatusAreaWidget* status_area_widget); |
| 66 ~TrayBackgroundView() override; | 66 ~TrayBackgroundView() override; |
| 67 | 67 |
| 68 // Called after the tray has been added to the widget containing it. | 68 // Called after the tray has been added to the widget containing it. |
| 69 virtual void Initialize(); | 69 virtual void Initialize(); |
| 70 | 70 |
| 71 // Initializes animations for the bubble. |
| 72 static void InitializeBubbleAnimations(views::Widget* bubble_widget); |
| 73 |
| 71 // views::View: | 74 // views::View: |
| 72 void SetVisible(bool visible) override; | 75 void SetVisible(bool visible) override; |
| 73 const char* GetClassName() const override; | 76 const char* GetClassName() const override; |
| 74 void OnMouseEntered(const ui::MouseEvent& event) override; | 77 void OnMouseEntered(const ui::MouseEvent& event) override; |
| 75 void OnMouseExited(const ui::MouseEvent& event) override; | 78 void OnMouseExited(const ui::MouseEvent& event) override; |
| 76 void ChildPreferredSizeChanged(views::View* child) override; | 79 void ChildPreferredSizeChanged(views::View* child) override; |
| 77 void GetAccessibleState(ui::AXViewState* state) override; | 80 void GetAccessibleState(ui::AXViewState* state) override; |
| 78 void AboutToRequestFocusFromTabTraversal(bool reverse) override; | 81 void AboutToRequestFocusFromTabTraversal(bool reverse) override; |
| 79 | 82 |
| 80 // ActionableView: | 83 // ActionableView: |
| (...skipping 28 matching lines...) Expand all Loading... |
| 109 void SetContents(views::View* contents); | 112 void SetContents(views::View* contents); |
| 110 | 113 |
| 111 // Creates and sets contents background to |background_|. | 114 // Creates and sets contents background to |background_|. |
| 112 void SetContentsBackground(); | 115 void SetContentsBackground(); |
| 113 | 116 |
| 114 // Sets whether the tray paints a background. Default is true, but is set to | 117 // Sets whether the tray paints a background. Default is true, but is set to |
| 115 // false if a window overlaps the shelf. | 118 // false if a window overlaps the shelf. |
| 116 void SetPaintsBackground(bool value, | 119 void SetPaintsBackground(bool value, |
| 117 BackgroundAnimatorChangeType change_type); | 120 BackgroundAnimatorChangeType change_type); |
| 118 | 121 |
| 119 // Initializes animations for the bubble. | |
| 120 void InitializeBubbleAnimations(views::Widget* bubble_widget); | |
| 121 | |
| 122 // Returns the window hosting the bubble. | 122 // Returns the window hosting the bubble. |
| 123 aura::Window* GetBubbleWindowContainer() const; | 123 aura::Window* GetBubbleWindowContainer() const; |
| 124 | 124 |
| 125 // Returns the anchor rect for the bubble. | 125 // Returns the anchor rect for the bubble. |
| 126 gfx::Rect GetBubbleAnchorRect( | 126 gfx::Rect GetBubbleAnchorRect( |
| 127 views::Widget* anchor_widget, | 127 views::Widget* anchor_widget, |
| 128 views::TrayBubbleView::AnchorType anchor_type, | 128 views::TrayBubbleView::AnchorType anchor_type, |
| 129 views::TrayBubbleView::AnchorAlignment anchor_alignment) const; | 129 views::TrayBubbleView::AnchorAlignment anchor_alignment) const; |
| 130 | 130 |
| 131 // Returns the bubble anchor alignment based on |shelf_alignment_|. | 131 // Returns the bubble anchor alignment based on |shelf_alignment_|. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 192 |
| 193 std::unique_ptr<TrayWidgetObserver> widget_observer_; | 193 std::unique_ptr<TrayWidgetObserver> widget_observer_; |
| 194 std::unique_ptr<TrayEventFilter> tray_event_filter_; | 194 std::unique_ptr<TrayEventFilter> tray_event_filter_; |
| 195 | 195 |
| 196 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); | 196 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 } // namespace ash | 199 } // namespace ash |
| 200 | 200 |
| 201 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ | 201 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ |
| OLD | NEW |