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