| 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_COMMON_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ | 6 #define ASH_COMMON_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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 ShelfAlignment shelf_alignment() const { return shelf_alignment_; } | 121 ShelfAlignment shelf_alignment() const { return shelf_alignment_; } |
| 122 TrayEventFilter* tray_event_filter() { return tray_event_filter_.get(); } | 122 TrayEventFilter* tray_event_filter() { return tray_event_filter_.get(); } |
| 123 WmShelf* shelf() { return wm_shelf_; } | 123 WmShelf* shelf() { return wm_shelf_; } |
| 124 | 124 |
| 125 // Updates the arrow visibility based on the launcher visibility. | 125 // Updates the arrow visibility based on the launcher visibility. |
| 126 void UpdateBubbleViewArrow(views::TrayBubbleView* bubble_view); | 126 void UpdateBubbleViewArrow(views::TrayBubbleView* bubble_view); |
| 127 | 127 |
| 128 // ShelfBackgroundAnimatorObserver: | 128 // ShelfBackgroundAnimatorObserver: |
| 129 void UpdateShelfItemBackground(int alpha) override; | 129 void UpdateShelfItemBackground(int alpha) override; |
| 130 | 130 |
| 131 // Updates the visibility of this tray's separator. | |
| 132 void SetSeparatorVisibility(bool is_show); | |
| 133 | |
| 134 // Gets the anchor for bubbles, which is tray_container(). | 131 // Gets the anchor for bubbles, which is tray_container(). |
| 135 views::View* GetBubbleAnchor() const; | 132 views::View* GetBubbleAnchor() const; |
| 136 | 133 |
| 137 // Gets additional insets for positioning bubbles relative to | 134 // Gets additional insets for positioning bubbles relative to |
| 138 // tray_container(). | 135 // tray_container(). |
| 139 gfx::Insets GetBubbleAnchorInsets() const; | 136 gfx::Insets GetBubbleAnchorInsets() const; |
| 140 | 137 |
| 141 protected: | 138 protected: |
| 142 // ActionableView: | 139 // ActionableView: |
| 143 std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override; | 140 std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // TODO(jamescook): Don't cache this, get it from WmShelf. | 173 // TODO(jamescook): Don't cache this, get it from WmShelf. |
| 177 ShelfAlignment shelf_alignment_; | 174 ShelfAlignment shelf_alignment_; |
| 178 | 175 |
| 179 // Owned by the view passed to SetContents(). | 176 // Owned by the view passed to SetContents(). |
| 180 TrayBackground* background_; | 177 TrayBackground* background_; |
| 181 | 178 |
| 182 // Determines if the view is active. This changes how the background is drawn | 179 // Determines if the view is active. This changes how the background is drawn |
| 183 // in non-MD version and how the ink drop ripples behave in MD version. | 180 // in non-MD version and how the ink drop ripples behave in MD version. |
| 184 bool is_active_; | 181 bool is_active_; |
| 185 | 182 |
| 186 // Visibility of this tray's separator which is a line of 1x32px and 4px to | |
| 187 // right of tray. | |
| 188 bool is_separator_visible_; | |
| 189 | |
| 190 std::unique_ptr<TrayWidgetObserver> widget_observer_; | 183 std::unique_ptr<TrayWidgetObserver> widget_observer_; |
| 191 std::unique_ptr<TrayEventFilter> tray_event_filter_; | 184 std::unique_ptr<TrayEventFilter> tray_event_filter_; |
| 192 | 185 |
| 193 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); | 186 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); |
| 194 }; | 187 }; |
| 195 | 188 |
| 196 } // namespace ash | 189 } // namespace ash |
| 197 | 190 |
| 198 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ | 191 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ |
| OLD | NEW |