| 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 "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/launcher/background_animator.h" | 9 #include "ash/shelf/background_animator.h" |
| 10 #include "ash/shelf_types.h" | 10 #include "ash/shelf/shelf_types.h" |
| 11 #include "ash/system/tray/actionable_view.h" | 11 #include "ash/system/tray/actionable_view.h" |
| 12 #include "ui/views/bubble/tray_bubble_view.h" | 12 #include "ui/views/bubble/tray_bubble_view.h" |
| 13 | 13 |
| 14 namespace ash { | 14 namespace ash { |
| 15 namespace internal { | 15 namespace internal { |
| 16 | 16 |
| 17 class ShelfLayoutManager; | 17 class ShelfLayoutManager; |
| 18 class StatusAreaWidget; | 18 class StatusAreaWidget; |
| 19 class TrayEventFilter; | 19 class TrayEventFilter; |
| 20 class TrayBackground; | 20 class TrayBackground; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // Called by the bubble wrapper when a click event occurs outside the bubble. | 93 // Called by the bubble wrapper when a click event occurs outside the bubble. |
| 94 // May close the bubble. Returns true if the event is handled. | 94 // May close the bubble. Returns true if the event is handled. |
| 95 virtual bool ClickedOutsideBubble() = 0; | 95 virtual bool ClickedOutsideBubble() = 0; |
| 96 | 96 |
| 97 // Sets |contents| as a child. | 97 // Sets |contents| as a child. |
| 98 void SetContents(views::View* contents); | 98 void SetContents(views::View* contents); |
| 99 | 99 |
| 100 // Creates and sets contents background to |background_|. | 100 // Creates and sets contents background to |background_|. |
| 101 void SetContentsBackground(); | 101 void SetContentsBackground(); |
| 102 | 102 |
| 103 // Sets whether the tray paints a background. Default is true, but is set to | |
| 104 // false if a window overlaps the shelf. | |
| 105 void SetPaintsBackground( | |
| 106 bool value, | |
| 107 internal::BackgroundAnimator::ChangeType change_type); | |
| 108 | |
| 109 // Initializes animations for the bubble. | 103 // Initializes animations for the bubble. |
| 110 void InitializeBubbleAnimations(views::Widget* bubble_widget); | 104 void InitializeBubbleAnimations(views::Widget* bubble_widget); |
| 111 | 105 |
| 112 // Returns the window hosting the bubble. | 106 // Returns the window hosting the bubble. |
| 113 aura::Window* GetBubbleWindowContainer() const; | 107 aura::Window* GetBubbleWindowContainer() const; |
| 114 | 108 |
| 115 // Returns the anchor rect for the bubble. | 109 // Returns the anchor rect for the bubble. |
| 116 gfx::Rect GetBubbleAnchorRect( | 110 gfx::Rect GetBubbleAnchorRect( |
| 117 views::Widget* anchor_widget, | 111 views::Widget* anchor_widget, |
| 118 views::TrayBubbleView::AnchorType anchor_type, | 112 views::TrayBubbleView::AnchorType anchor_type, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 148 | 142 |
| 149 // Convenience pointer to the contents view. | 143 // Convenience pointer to the contents view. |
| 150 TrayContainer* tray_container_; | 144 TrayContainer* tray_container_; |
| 151 | 145 |
| 152 // Shelf alignment. | 146 // Shelf alignment. |
| 153 ShelfAlignment shelf_alignment_; | 147 ShelfAlignment shelf_alignment_; |
| 154 | 148 |
| 155 // Owned by the view passed to SetContents(). | 149 // Owned by the view passed to SetContents(). |
| 156 internal::TrayBackground* background_; | 150 internal::TrayBackground* background_; |
| 157 | 151 |
| 158 internal::BackgroundAnimator hide_background_animator_; | |
| 159 internal::BackgroundAnimator hover_background_animator_; | 152 internal::BackgroundAnimator hover_background_animator_; |
| 160 scoped_ptr<TrayWidgetObserver> widget_observer_; | 153 scoped_ptr<TrayWidgetObserver> widget_observer_; |
| 161 scoped_ptr<TrayEventFilter> tray_event_filter_; | 154 scoped_ptr<TrayEventFilter> tray_event_filter_; |
| 162 | 155 |
| 163 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); | 156 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); |
| 164 }; | 157 }; |
| 165 | 158 |
| 166 } // namespace internal | 159 } // namespace internal |
| 167 } // namespace ash | 160 } // namespace ash |
| 168 | 161 |
| 169 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ | 162 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ |
| OLD | NEW |