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

Unified Diff: ash/system/session/logout_button_tray.h

Issue 2807693002: Make LogoutButtonTray a regular View (Closed)
Patch Set: Rebased Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/palette/palette_tray.cc ('k') | ash/system/session/logout_button_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « ash/system/palette/palette_tray.cc ('k') | ash/system/session/logout_button_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698