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

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

Issue 2103603002: mash: Remove StatusAreaWidget references from system tray classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak Created 4 years, 5 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_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/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/compiler_specific.h"
13 #include "base/macros.h" 12 #include "base/macros.h"
14 #include "base/time/time.h" 13 #include "base/time/time.h"
15 #include "ui/views/controls/button/button.h" 14 #include "ui/views/controls/button/button.h"
16 15
17 namespace views { 16 namespace views {
18 class LabelButton; 17 class LabelButton;
19 } 18 }
20 19
21 namespace ash { 20 namespace ash {
22 21
23 class StatusAreaWidget; 22 class WmShelf;
msw 2016/06/27 23:57:36 optional nit: rely on tray_background_view.h forwa
James Cook 2016/06/28 00:47:25 Done.
24 23
25 // 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
26 // kShowLogoutButtonInTray pref. 25 // kShowLogoutButtonInTray pref.
27 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView, 26 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView,
28 public LogoutButtonObserver, 27 public LogoutButtonObserver,
29 public views::ButtonListener { 28 public views::ButtonListener {
30 public: 29 public:
31 explicit LogoutButtonTray(StatusAreaWidget* status_area_widget); 30 explicit LogoutButtonTray(WmShelf* wm_shelf);
32 ~LogoutButtonTray() override; 31 ~LogoutButtonTray() override;
33 32
34 // TrayBackgroundView: 33 // TrayBackgroundView:
35 void SetShelfAlignment(ShelfAlignment alignment) override; 34 void SetShelfAlignment(ShelfAlignment alignment) override;
36 base::string16 GetAccessibleNameForTray() override; 35 base::string16 GetAccessibleNameForTray() override;
37 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; 36 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
38 void ClickedOutsideBubble() override; 37 void ClickedOutsideBubble() override;
39 38
40 // LogoutButtonObserver: 39 // LogoutButtonObserver:
41 void OnShowLogoutButtonInTrayChanged(bool show) override; 40 void OnShowLogoutButtonInTrayChanged(bool show) override;
(...skipping 11 matching lines...) Expand all
53 LoginStatus login_status_; 52 LoginStatus login_status_;
54 bool show_logout_button_in_tray_; 53 bool show_logout_button_in_tray_;
55 base::TimeDelta dialog_duration_; 54 base::TimeDelta dialog_duration_;
56 55
57 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray); 56 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray);
58 }; 57 };
59 58
60 } // namespace ash 59 } // namespace ash
61 60
62 #endif // ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ 61 #endif // ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698