| Index: ash/system/session/logout_button_tray.h
|
| diff --git a/ash/system/session/logout_button_tray.h b/ash/system/session/logout_button_tray.h
|
| index 37d7d2888c5aa2deb41c700539dd2f2c9b5bcabe..0e4b26e75a077996128bfdde26307139cdfcb3fd 100644
|
| --- a/ash/system/session/logout_button_tray.h
|
| +++ b/ash/system/session/logout_button_tray.h
|
| @@ -6,49 +6,49 @@
|
| #define ASH_SYSTEM_SESSION_LOGOUT_BUTTON_TRAY_H_
|
|
|
| #include "ash/ash_export.h"
|
| -#include "ash/login_status.h"
|
| #include "ash/system/session/logout_button_observer.h"
|
| -#include "ash/system/tray/tray_background_view.h"
|
| #include "base/macros.h"
|
| #include "base/time/time.h"
|
| #include "ui/views/controls/button/button.h"
|
| +#include "ui/views/view.h"
|
|
|
| namespace views {
|
| -class LabelButton;
|
| +class MdTextButton;
|
| }
|
|
|
| namespace ash {
|
| +class TrayContainer;
|
| +class WmShelf;
|
|
|
| // Adds a logout button to the launcher's status area if enabled by the
|
| // kShowLogoutButtonInTray pref.
|
| -// TODO(mohsen): This is not using much of the TrayBackgroundView functionality.
|
| -// Consider making this a regular View. See https://crbug.com/698134.
|
| -class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView,
|
| - public LogoutButtonObserver {
|
| +class ASH_EXPORT LogoutButtonTray : public views::View,
|
| + public LogoutButtonObserver,
|
| + public views::ButtonListener {
|
| public:
|
| explicit LogoutButtonTray(WmShelf* wm_shelf);
|
| ~LogoutButtonTray() override;
|
|
|
| - // TrayBackgroundView:
|
| - void SetShelfAlignment(ShelfAlignment alignment) override;
|
| - base::string16 GetAccessibleNameForTray() override;
|
| - void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
|
| - void ClickedOutsideBubble() override;
|
| - void ButtonPressed(views::Button* sender, const ui::Event& event) override;
|
| + void UpdateAfterLoginStatusChange();
|
| + void UpdateAfterShelfAlignmentChange();
|
| +
|
| + // views::View:
|
| + void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
|
|
|
| // LogoutButtonObserver:
|
| void OnShowLogoutButtonInTrayChanged(bool show) override;
|
| void OnLogoutDialogDurationChanged(base::TimeDelta duration) override;
|
|
|
| - void UpdateAfterLoginStatusChange(LoginStatus login_status);
|
| + // views::ButtonListener:
|
| + void ButtonPressed(views::Button* sender, const ui::Event& event) override;
|
|
|
| private:
|
| void UpdateVisibility();
|
| - void UpdateButtonTextAndImage(LoginStatus login_status,
|
| - ShelfAlignment alignment);
|
| + void UpdateButtonTextAndImage();
|
|
|
| - views::LabelButton* button_;
|
| - LoginStatus login_status_;
|
| + WmShelf* const wm_shelf_;
|
| + TrayContainer* const container_;
|
| + views::MdTextButton* const button_;
|
| bool show_logout_button_in_tray_;
|
| base::TimeDelta dialog_duration_;
|
|
|
|
|