1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ASH_SYSTEM_LOGOUT_BUTTON_TRAY_LOGOUT_BUTTON_H_
6 #define ASH_SYSTEM_LOGOUT_BUTTON_TRAY_LOGOUT_BUTTON_H_
8 #include "ash/system/logout_button/logout_button_observer.h"
9 #include "ash/system/tray/system_tray_item.h"
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
20 // Adds a logout button to the system tray if enabled by the
21 // kShowLogoutButtonInTray pref.
22 class TrayLogoutButton
: public SystemTrayItem
, public LogoutButtonObserver
{
24 explicit TrayLogoutButton(SystemTray
* system_tray
);
25 virtual ~TrayLogoutButton();
27 // Overridden from SystemTrayItem.
28 virtual views::View
* CreateTrayView(user::LoginStatus status
) OVERRIDE
;
29 virtual void DestroyTrayView() OVERRIDE
;
30 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status
) OVERRIDE
;
32 // Overridden from LogoutButtonObserver.
33 virtual void OnShowLogoutButtonInTrayChanged(bool show
) OVERRIDE
;
36 tray::LogoutButton
* logout_button_
;
38 DISALLOW_COPY_AND_ASSIGN(TrayLogoutButton
);
41 } // namespace internal
44 #endif // ASH_SYSTEM_LOGOUT_BUTTON_TRAY_LOGOUT_BUTTON_H_