Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Side by Side Diff: ash/common/system/chromeos/session/logout_button_tray.h

Issue 2723843002: Remove non-MD code from TrayBackgroundView (Closed)
Patch Set: Rebased Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_COMMON_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ 6 #define ASH_COMMON_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/login_status.h" 9 #include "ash/common/login_status.h"
10 #include "ash/common/system/chromeos/session/logout_button_observer.h" 10 #include "ash/common/system/chromeos/session/logout_button_observer.h"
11 #include "ash/common/system/tray/tray_background_view.h" 11 #include "ash/common/system/tray/tray_background_view.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "ui/views/controls/button/button.h" 14 #include "ui/views/controls/button/button.h"
15 15
16 namespace views { 16 namespace views {
17 class LabelButton; 17 class LabelButton;
18 } 18 }
19 19
20 namespace ash { 20 namespace ash {
21 21
22 // Adds a logout button to the launcher's status area if enabled by the 22 // Adds a logout button to the launcher's status area if enabled by the
23 // kShowLogoutButtonInTray pref. 23 // kShowLogoutButtonInTray pref.
24 // TODO(mohsen): This is not using much of the TrayBackgroundView functionality.
25 // Consider making this a regular View. See https://crbug.com/698134.
24 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView, 26 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView,
25 public LogoutButtonObserver { 27 public LogoutButtonObserver {
26 public: 28 public:
27 explicit LogoutButtonTray(WmShelf* wm_shelf); 29 explicit LogoutButtonTray(WmShelf* wm_shelf);
28 ~LogoutButtonTray() override; 30 ~LogoutButtonTray() override;
29 31
30 // TrayBackgroundView: 32 // TrayBackgroundView:
31 void SetShelfAlignment(ShelfAlignment alignment) override; 33 void SetShelfAlignment(ShelfAlignment alignment) override;
32 base::string16 GetAccessibleNameForTray() override; 34 base::string16 GetAccessibleNameForTray() override;
33 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; 35 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
(...skipping 15 matching lines...) Expand all
49 LoginStatus login_status_; 51 LoginStatus login_status_;
50 bool show_logout_button_in_tray_; 52 bool show_logout_button_in_tray_;
51 base::TimeDelta dialog_duration_; 53 base::TimeDelta dialog_duration_;
52 54
53 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray); 55 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray);
54 }; 56 };
55 57
56 } // namespace ash 58 } // namespace ash
57 59
58 #endif // ASH_COMMON_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ 60 #endif // ASH_COMMON_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/palette/palette_tray.cc ('k') | ash/common/system/chromeos/session/logout_button_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698