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/session/session_observer.h" | 9 #include "ash/session/session_observer.h" |
10 #include "ash/shell_observer.h" | 10 #include "ash/shell_observer.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 // This tray will only be visible while in this state. This tray does not | 23 // This tray will only be visible while in this state. This tray does not |
24 // provide any bubble view windows. | 24 // provide any bubble view windows. |
25 class ASH_EXPORT OverviewButtonTray : public TrayBackgroundView, | 25 class ASH_EXPORT OverviewButtonTray : public TrayBackgroundView, |
26 public SessionObserver, | 26 public SessionObserver, |
27 public ShellObserver { | 27 public ShellObserver { |
28 public: | 28 public: |
29 explicit OverviewButtonTray(Shelf* shelf); | 29 explicit OverviewButtonTray(Shelf* shelf); |
30 ~OverviewButtonTray() override; | 30 ~OverviewButtonTray() override; |
31 | 31 |
32 // Updates the tray's visibility based on the LoginStatus and the current | 32 // Updates the tray's visibility based on the LoginStatus and the current |
33 // state of MaximizeMode | 33 // state of TabletMode |
34 virtual void UpdateAfterLoginStatusChange(LoginStatus status); | 34 virtual void UpdateAfterLoginStatusChange(LoginStatus status); |
35 | 35 |
36 // ActionableView: | 36 // ActionableView: |
37 bool PerformAction(const ui::Event& event) override; | 37 bool PerformAction(const ui::Event& event) override; |
38 | 38 |
39 // SessionObserver: | 39 // SessionObserver: |
40 void OnSessionStateChanged(session_manager::SessionState state) override; | 40 void OnSessionStateChanged(session_manager::SessionState state) override; |
41 | 41 |
42 // ShellObserver: | 42 // ShellObserver: |
43 void OnMaximizeModeStarted() override; | 43 void OnTabletModeStarted() override; |
44 void OnMaximizeModeEnded() override; | 44 void OnTabletModeEnded() override; |
45 void OnOverviewModeStarting() override; | 45 void OnOverviewModeStarting() override; |
46 void OnOverviewModeEnded() override; | 46 void OnOverviewModeEnded() override; |
47 | 47 |
48 // TrayBackgroundView: | 48 // TrayBackgroundView: |
49 void ClickedOutsideBubble() override; | 49 void ClickedOutsideBubble() override; |
50 base::string16 GetAccessibleNameForTray() override; | 50 base::string16 GetAccessibleNameForTray() override; |
51 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; | 51 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; |
52 | 52 |
53 private: | 53 private: |
54 friend class OverviewButtonTrayTest; | 54 friend class OverviewButtonTrayTest; |
55 | 55 |
56 // Sets the icon to visible if maximize mode is enabled and | 56 // Sets the icon to visible if tablet mode is enabled and |
57 // WindowSelectorController::CanSelect. | 57 // WindowSelectorController::CanSelect. |
58 void UpdateIconVisibility(); | 58 void UpdateIconVisibility(); |
59 | 59 |
60 // Weak pointer, will be parented by TrayContainer for its lifetime. | 60 // Weak pointer, will be parented by TrayContainer for its lifetime. |
61 views::ImageView* icon_; | 61 views::ImageView* icon_; |
62 | 62 |
63 ScopedSessionObserver scoped_session_observer_; | 63 ScopedSessionObserver scoped_session_observer_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(OverviewButtonTray); | 65 DISALLOW_COPY_AND_ASSIGN(OverviewButtonTray); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace ash | 68 } // namespace ash |
69 | 69 |
70 #endif // ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ | 70 #endif // ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ |
OLD | NEW |