Windows should animate when they are about to get docked at screen edges.
[chromium-blink-merge.git] / ash / system / logout_button / tray_logout_button.h
blob50ca9f9c2c1bab171710d343544ec16b34cb06d9
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"
13 namespace ash {
14 namespace internal {
16 namespace tray {
17 class LogoutButton;
20 // Adds a logout button to the system tray if enabled by the
21 // kShowLogoutButtonInTray pref.
22 class TrayLogoutButton : public SystemTrayItem, public LogoutButtonObserver {
23 public:
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;
35 private:
36 tray::LogoutButton* logout_button_;
38 DISALLOW_COPY_AND_ASSIGN(TrayLogoutButton);
41 } // namespace internal
42 } // namespace ash
44 #endif // ASH_SYSTEM_LOGOUT_BUTTON_TRAY_LOGOUT_BUTTON_H_