Disable accessible touch exploration by default.
[chromium-blink-merge.git] / ash / system / chromeos / session / logout_button_tray.h
blob8c40c2a898d88a877e13df051f00a1bf80d22302
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
3 // found in the LICENSE file.
5 #ifndef ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_
6 #define ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_
8 #include "ash/ash_export.h"
9 #include "ash/system/chromeos/session/logout_button_observer.h"
10 #include "ash/system/tray/tray_background_view.h"
11 #include "ash/system/user/login_status.h"
12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h"
14 #include "base/time/time.h"
15 #include "ui/views/controls/button/button.h"
17 namespace views {
18 class LabelButton;
21 namespace ash {
22 class StatusAreaWidget;
24 // Adds a logout button to the launcher's status area if enabled by the
25 // kShowLogoutButtonInTray pref.
26 class ASH_EXPORT LogoutButtonTray : public TrayBackgroundView,
27 public LogoutButtonObserver,
28 public views::ButtonListener {
29 public:
30 explicit LogoutButtonTray(StatusAreaWidget* status_area_widget);
31 virtual ~LogoutButtonTray();
33 // TrayBackgroundView:
34 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE;
35 virtual base::string16 GetAccessibleNameForTray() OVERRIDE;
36 virtual void HideBubbleWithView(
37 const views::TrayBubbleView* bubble_view) OVERRIDE;
38 virtual bool ClickedOutsideBubble() OVERRIDE;
40 // LogoutButtonObserver:
41 virtual void OnShowLogoutButtonInTrayChanged(bool show) OVERRIDE;
42 virtual void OnLogoutDialogDurationChanged(base::TimeDelta duration) OVERRIDE;
44 // views::ButtonListener:
45 virtual void ButtonPressed(views::Button* sender,
46 const ui::Event& event) OVERRIDE;
48 void UpdateAfterLoginStatusChange(user::LoginStatus login_status);
50 private:
51 void UpdateVisibility();
53 views::LabelButton* button_;
54 user::LoginStatus login_status_;
55 bool show_logout_button_in_tray_;
56 base::TimeDelta dialog_duration_;
58 DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray);
61 } // namespace ash
63 #endif // ASH_SYSTEM_CHROMEOS_SESSION_LOGOUT_BUTTON_TRAY_H_