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

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

Issue 2147143002: [Chrome OS MD] Draw a 1px separator between 2 tray items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 4 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 class ViewObserver;
James Cook 2016/08/09 00:25:17 not needed
yiyix 2016/08/11 01:23:18 Done.
22 class WmShelfObserver;
21 23
22 // 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
23 // kShowLogoutButtonInTray pref. 25 // kShowLogoutButtonInTray pref.
24 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView, 26 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView,
25 public LogoutButtonObserver, 27 public LogoutButtonObserver,
26 public views::ButtonListener { 28 public views::ButtonListener {
27 public: 29 public:
28 explicit LogoutButtonTray(WmShelf* wm_shelf); 30 explicit LogoutButtonTray(WmShelf* wm_shelf,
varkha 2016/08/10 23:27:24 nit: no need for explicit.
yiyix 2016/08/11 01:23:18 After changing the observer, there will be only 1
31 WmShelfObserver* wm_shelf_observer);
29 ~LogoutButtonTray() override; 32 ~LogoutButtonTray() override;
30 33
31 // TrayBackgroundView: 34 // TrayBackgroundView:
32 void SetShelfAlignment(ShelfAlignment alignment) override; 35 void SetShelfAlignment(ShelfAlignment alignment) override;
33 base::string16 GetAccessibleNameForTray() override; 36 base::string16 GetAccessibleNameForTray() override;
34 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; 37 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
35 void ClickedOutsideBubble() override; 38 void ClickedOutsideBubble() override;
36 39
37 // LogoutButtonObserver: 40 // LogoutButtonObserver:
38 void OnShowLogoutButtonInTrayChanged(bool show) override; 41 void OnShowLogoutButtonInTrayChanged(bool show) override;
(...skipping 11 matching lines...) Expand all
50 LoginStatus login_status_; 53 LoginStatus login_status_;
51 bool show_logout_button_in_tray_; 54 bool show_logout_button_in_tray_;
52 base::TimeDelta dialog_duration_; 55 base::TimeDelta dialog_duration_;
53 56
54 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray); 57 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray);
55 }; 58 };
56 59
57 } // namespace ash 60 } // namespace ash
58 61
59 #endif // ASH_COMMON_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_ 62 #endif // ASH_COMMON_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698