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

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

Issue 2103113003: Fix shelf layout when switching from left-aligned shelf to right-aligned shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.
tdanderson 2016/06/29 17:46:19 nit: please format the CL description as: <title>
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"
(...skipping 10 matching lines...) Expand all
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 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView, 24 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView,
25 public LogoutButtonObserver, 25 public LogoutButtonObserver,
26 public views::ButtonListener { 26 public views::ButtonListener {
27 public: 27 public:
28 explicit LogoutButtonTray(WmShelf* wm_shelf); 28 explicit LogoutButtonTray(WmShelf* wm_shelf);
29 ~LogoutButtonTray() override; 29 ~LogoutButtonTray() override;
30 30
31 // TrayBackgroundView: 31 // TrayBackgroundView:
32 void SetShelfAlignment(ShelfAlignment alignment) override; 32 void SetShelfAlignment(ShelfAlignment alignment,
33 const gfx::Insets& insets) override;
33 base::string16 GetAccessibleNameForTray() override; 34 base::string16 GetAccessibleNameForTray() override;
34 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; 35 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
35 void ClickedOutsideBubble() override; 36 void ClickedOutsideBubble() override;
36 37
37 // LogoutButtonObserver: 38 // LogoutButtonObserver:
38 void OnShowLogoutButtonInTrayChanged(bool show) override; 39 void OnShowLogoutButtonInTrayChanged(bool show) override;
39 void OnLogoutDialogDurationChanged(base::TimeDelta duration) override; 40 void OnLogoutDialogDurationChanged(base::TimeDelta duration) override;
40 41
41 // views::ButtonListener: 42 // views::ButtonListener:
42 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 43 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
43 44
44 void UpdateAfterLoginStatusChange(LoginStatus login_status); 45 void UpdateAfterLoginStatusChange(LoginStatus login_status);
45 46
46 private: 47 private:
47 void UpdateVisibility(); 48 void UpdateVisibility();
48 49
49 views::LabelButton* button_; 50 views::LabelButton* button_;
50 LoginStatus login_status_; 51 LoginStatus login_status_;
51 bool show_logout_button_in_tray_; 52 bool show_logout_button_in_tray_;
52 base::TimeDelta dialog_duration_; 53 base::TimeDelta dialog_duration_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray); 55 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray);
55 }; 56 };
56 57
57 } // namespace ash 58 } // namespace ash
58 59
59 #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 | « no previous file | ash/common/system/chromeos/session/logout_button_tray.cc » ('j') | ash/common/system/tray/tray_background_view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698