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_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ |
6 #define ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ | 6 #define ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/system/chromeos/session/logout_button_observer.h" | 9 #include "ash/system/chromeos/session/logout_button_observer.h" |
10 #include "ash/system/tray/tray_background_view.h" | 10 #include "ash/system/tray/tray_background_view.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // Adds a logout button to the launcher's status area if enabled by the | 24 // Adds a logout button to the launcher's status area if enabled by the |
25 // kShowLogoutButtonInTray pref. | 25 // kShowLogoutButtonInTray pref. |
26 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView, | 26 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView, |
27 public LogoutButtonObserver, | 27 public LogoutButtonObserver, |
28 public views::ButtonListener { | 28 public views::ButtonListener { |
29 public: | 29 public: |
30 explicit LogoutButtonTray(StatusAreaWidget* status_area_widget); | 30 explicit LogoutButtonTray(StatusAreaWidget* status_area_widget); |
31 virtual ~LogoutButtonTray(); | 31 virtual ~LogoutButtonTray(); |
32 | 32 |
33 // TrayBackgroundView: | 33 // TrayBackgroundView: |
34 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; | 34 virtual void SetShelfAlignment(ShelfAlignment alignment) override; |
35 virtual base::string16 GetAccessibleNameForTray() OVERRIDE; | 35 virtual base::string16 GetAccessibleNameForTray() override; |
36 virtual void HideBubbleWithView( | 36 virtual void HideBubbleWithView( |
37 const views::TrayBubbleView* bubble_view) OVERRIDE; | 37 const views::TrayBubbleView* bubble_view) override; |
38 virtual bool ClickedOutsideBubble() OVERRIDE; | 38 virtual bool ClickedOutsideBubble() override; |
39 | 39 |
40 // LogoutButtonObserver: | 40 // LogoutButtonObserver: |
41 virtual void OnShowLogoutButtonInTrayChanged(bool show) OVERRIDE; | 41 virtual void OnShowLogoutButtonInTrayChanged(bool show) override; |
42 virtual void OnLogoutDialogDurationChanged(base::TimeDelta duration) OVERRIDE; | 42 virtual void OnLogoutDialogDurationChanged(base::TimeDelta duration) override; |
43 | 43 |
44 // views::ButtonListener: | 44 // views::ButtonListener: |
45 virtual void ButtonPressed(views::Button* sender, | 45 virtual void ButtonPressed(views::Button* sender, |
46 const ui::Event& event) OVERRIDE; | 46 const ui::Event& event) override; |
47 | 47 |
48 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); | 48 void UpdateAfterLoginStatusChange(user::LoginStatus login_status); |
49 | 49 |
50 private: | 50 private: |
51 void UpdateVisibility(); | 51 void UpdateVisibility(); |
52 | 52 |
53 views::LabelButton* button_; | 53 views::LabelButton* button_; |
54 user::LoginStatus login_status_; | 54 user::LoginStatus login_status_; |
55 bool show_logout_button_in_tray_; | 55 bool show_logout_button_in_tray_; |
56 base::TimeDelta dialog_duration_; | 56 base::TimeDelta dialog_duration_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray); | 58 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace ash | 61 } // namespace ash |
62 | 62 |
63 #endif // ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ | 63 #endif // ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ |
OLD | NEW |