| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ | 5 #ifndef ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ |
| 6 #define ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ | 6 #define ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/shell_observer.h" | 9 #include "ash/shell_observer.h" |
| 10 #include "ash/system/tray/tray_background_view.h" | 10 #include "ash/system/tray/tray_background_view.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 virtual void OnMaximizeModeStarted() OVERRIDE; | 33 virtual void OnMaximizeModeStarted() OVERRIDE; |
| 34 virtual void OnMaximizeModeEnded() OVERRIDE; | 34 virtual void OnMaximizeModeEnded() OVERRIDE; |
| 35 | 35 |
| 36 // internal::TrayBackgroundView: | 36 // internal::TrayBackgroundView: |
| 37 virtual bool ClickedOutsideBubble() OVERRIDE; | 37 virtual bool ClickedOutsideBubble() OVERRIDE; |
| 38 virtual base::string16 GetAccessibleNameForTray() OVERRIDE; | 38 virtual base::string16 GetAccessibleNameForTray() OVERRIDE; |
| 39 virtual void HideBubbleWithView( | 39 virtual void HideBubbleWithView( |
| 40 const views::TrayBubbleView* bubble_view) OVERRIDE; | 40 const views::TrayBubbleView* bubble_view) OVERRIDE; |
| 41 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; | 41 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; |
| 42 | 42 |
| 43 // Updates the tray's visibility based on the LoginStatus and the current |
| 44 // state of MaximizeMode |
| 45 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status); |
| 46 |
| 43 private: | 47 private: |
| 44 friend class OverviewButtonTrayTest; | 48 friend class OverviewButtonTrayTest; |
| 45 | 49 |
| 46 // Creates a new border for the icon. The padding is determined based on the | 50 // Creates a new border for the icon. The padding is determined based on the |
| 47 // alignment of the shelf. | 51 // alignment of the shelf. |
| 48 void SetIconBorderForShelfAlignment(); | 52 void SetIconBorderForShelfAlignment(); |
| 49 | 53 |
| 54 // Sets the icon to visible if |maximize_mode_enabled| and |
| 55 // WindowSelectorController::CanSelect. |
| 56 void SetIconVisibility(bool maximize_mode_enabled); |
| 57 |
| 50 // Weak pointer, will be parented by TrayContainer for its lifetime. | 58 // Weak pointer, will be parented by TrayContainer for its lifetime. |
| 51 views::ImageView* icon_; | 59 views::ImageView* icon_; |
| 52 | 60 |
| 53 DISALLOW_COPY_AND_ASSIGN(OverviewButtonTray); | 61 DISALLOW_COPY_AND_ASSIGN(OverviewButtonTray); |
| 54 }; | 62 }; |
| 55 | 63 |
| 56 } // namespace ash | 64 } // namespace ash |
| 57 | 65 |
| 58 #endif // ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ | 66 #endif // ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ |
| OLD | NEW |