(Cleanup) Remove .Times(1) from the VideoCaptureManagerTest unit tests EXPECT_CALLs.
[chromium-blink-merge.git] / ash / system / tray_accessibility.h
blob1d6e9f8557234a0d2856ccab3392b45ba373d45b
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_TRAY_ACCESSIBILITY_H_
6 #define ASH_SYSTEM_TRAY_ACCESSIBILITY_H_
8 #include "ash/accessibility_delegate.h"
9 #include "ash/shell_observer.h"
10 #include "ash/system/tray/tray_details_view.h"
11 #include "ash/system/tray/tray_image_item.h"
12 #include "ash/system/tray/view_click_listener.h"
13 #include "base/gtest_prod_util.h"
14 #include "ui/gfx/font.h"
15 #include "ui/views/controls/button/button.h"
17 namespace chromeos {
18 class TrayAccessibilityTest;
21 namespace views {
22 class Button;
23 class ImageView;
24 class View;
27 namespace ash {
29 class SystemTrayItem;
31 class ASH_EXPORT AccessibilityObserver {
32 public:
33 virtual ~AccessibilityObserver() {}
35 // Notifies when accessibilty mode changes.
36 virtual void OnAccessibilityModeChanged(
37 AccessibilityNotificationVisibility notify) = 0;
40 namespace internal {
42 class HoverHighlightView;
44 namespace tray {
46 class AccessibilityPopupView;
48 class AccessibilityDetailedView : public TrayDetailsView,
49 public ViewClickListener,
50 public views::ButtonListener,
51 public ShellObserver {
52 public:
53 explicit AccessibilityDetailedView(SystemTrayItem* owner,
54 user::LoginStatus login);
55 virtual ~AccessibilityDetailedView() {}
57 private:
58 // Add the accessibility feature list.
59 void AppendAccessibilityList();
61 // Add help entries.
62 void AppendHelpEntries();
64 HoverHighlightView* AddScrollListItem(const base::string16& text,
65 gfx::Font::FontStyle style,
66 bool checked);
67 // Overridden from ViewClickListener.
68 virtual void OnViewClicked(views::View* sender) OVERRIDE;
69 // Overridden from ButtonListener.
70 virtual void ButtonPressed(views::Button* sender,
71 const ui::Event& event) OVERRIDE;
73 views::View* spoken_feedback_view_;
74 views::View* high_contrast_view_;
75 views::View* screen_magnifier_view_;
76 views::View* large_cursor_view_;
77 views::View* help_view_;
78 views::View* settings_view_;
79 views::View* autoclick_view_;
80 views::View* virtual_keyboard_view_;
82 bool spoken_feedback_enabled_;
83 bool high_contrast_enabled_;
84 bool screen_magnifier_enabled_;
85 bool large_cursor_enabled_;
86 bool autoclick_enabled_;
87 bool virtual_keyboard_enabled_;
88 user::LoginStatus login_;
90 friend class chromeos::TrayAccessibilityTest;
91 DISALLOW_COPY_AND_ASSIGN(AccessibilityDetailedView);
94 } // namespace tray
96 class TrayAccessibility : public TrayImageItem,
97 public AccessibilityObserver {
98 public:
99 explicit TrayAccessibility(SystemTray* system_tray);
100 virtual ~TrayAccessibility();
102 private:
103 void SetTrayIconVisible(bool visible);
104 tray::AccessibilityDetailedView* CreateDetailedMenu();
106 // Overridden from TrayImageItem.
107 virtual bool GetInitialVisibility() OVERRIDE;
108 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
109 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
110 virtual void DestroyDefaultView() OVERRIDE;
111 virtual void DestroyDetailedView() OVERRIDE;
112 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
114 // Overridden from AccessibilityObserver.
115 virtual void OnAccessibilityModeChanged(
116 AccessibilityNotificationVisibility notify) OVERRIDE;
118 views::View* default_;
119 tray::AccessibilityPopupView* detailed_popup_;
120 tray::AccessibilityDetailedView* detailed_menu_;
122 bool request_popup_view_;
123 bool tray_icon_visible_;
124 user::LoginStatus login_;
126 // Bitmap of values from AccessibilityState enum.
127 uint32 previous_accessibility_state_;
129 // A11y feature status on just entering the lock screen.
130 bool show_a11y_menu_on_lock_screen_;
132 friend class chromeos::TrayAccessibilityTest;
133 DISALLOW_COPY_AND_ASSIGN(TrayAccessibility);
136 } // namespace internal
137 } // namespace ash
139 #endif // ASH_SYSTEM_TRAY_ACCESSIBILITY_H_