OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ |
| 6 #define ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 #include "ash/shell_observer.h" |
| 10 #include "ash/system/tray/tray_background_view.h" |
| 11 |
| 12 namespace views { |
| 13 class ImageView; |
| 14 } |
| 15 |
| 16 namespace ash { |
| 17 |
| 18 // Status area tray for showing a toggle for Overview Mode. Overview Mode |
| 19 // is equivalent to WindowSelectorController being in selection mode. |
| 20 // This hosts a ShellObserver that listens for the activation of Maximize Mode |
| 21 // This tray will only be visible while in this state. This tray does not |
| 22 // provide any bubble view windows. |
| 23 class ASH_EXPORT OverviewButtonTray : public internal::TrayBackgroundView, |
| 24 public ShellObserver { |
| 25 public: |
| 26 explicit OverviewButtonTray(internal::StatusAreaWidget* status_area_widget); |
| 27 virtual ~OverviewButtonTray(); |
| 28 |
| 29 // internal::ActionableView: |
| 30 virtual bool PerformAction(const ui::Event& event) OVERRIDE; |
| 31 |
| 32 // ShellObserver: |
| 33 virtual void OnMaximizeModeStarted() OVERRIDE; |
| 34 virtual void OnMaximizeModeEnded() OVERRIDE; |
| 35 |
| 36 // internal::TrayBackgroundView: |
| 37 virtual bool ClickedOutsideBubble() OVERRIDE; |
| 38 virtual base::string16 GetAccessibleNameForTray() OVERRIDE; |
| 39 virtual void HideBubbleWithView( |
| 40 const views::TrayBubbleView* bubble_view) OVERRIDE; |
| 41 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; |
| 42 |
| 43 private: |
| 44 friend class OverviewButtonTrayTest; |
| 45 |
| 46 // Creates a new border for the icon. The padding is determined based on the |
| 47 // alignment of the shelf. |
| 48 void SetIconBorderForShelfAlignment(); |
| 49 |
| 50 // Weak pointer, will be parented by TrayContainer for its lifetime. |
| 51 views::ImageView* icon_; |
| 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(OverviewButtonTray); |
| 54 }; |
| 55 |
| 56 } // namespace ash |
| 57 |
| 58 #endif // ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ |
OLD | NEW |