OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_TRAY_ACCESSIBILITY_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_ACCESSIBILITY_H_ |
6 #define ASH_COMMON_SYSTEM_TRAY_ACCESSIBILITY_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_ACCESSIBILITY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "ash/common/accessibility_delegate.h" | 10 #include "ash/common/accessibility_delegate.h" |
11 #include "ash/common/shell_observer.h" | 11 #include "ash/common/shell_observer.h" |
12 #include "ash/common/system/accessibility_observer.h" | 12 #include "ash/common/system/accessibility_observer.h" |
13 #include "ash/common/system/tray/tray_details_view.h" | 13 #include "ash/common/system/tray/tray_details_view.h" |
14 #include "ash/common/system/tray/tray_image_item.h" | 14 #include "ash/common/system/tray/tray_image_item.h" |
15 #include "ash/common/system/tray/tray_notification_view.h" | 15 #include "ash/common/system/tray/tray_notification_view.h" |
16 #include "ash/common/system/tray/view_click_listener.h" | |
17 #include "base/macros.h" | 16 #include "base/macros.h" |
18 #include "ui/gfx/font.h" | 17 #include "ui/gfx/font.h" |
19 #include "ui/views/controls/button/button.h" | 18 #include "ui/views/controls/button/button.h" |
20 | 19 |
21 namespace chromeos { | 20 namespace chromeos { |
22 class TrayAccessibilityTest; | 21 class TrayAccessibilityTest; |
23 } | 22 } |
24 | 23 |
25 namespace views { | 24 namespace views { |
26 class Button; | 25 class Button; |
(...skipping 16 matching lines...) Expand all Loading... |
43 | 42 |
44 private: | 43 private: |
45 views::Label* CreateLabel(uint32_t enabled_state_bits); | 44 views::Label* CreateLabel(uint32_t enabled_state_bits); |
46 | 45 |
47 views::Label* label_; | 46 views::Label* label_; |
48 | 47 |
49 DISALLOW_COPY_AND_ASSIGN(AccessibilityPopupView); | 48 DISALLOW_COPY_AND_ASSIGN(AccessibilityPopupView); |
50 }; | 49 }; |
51 | 50 |
52 class AccessibilityDetailedView : public TrayDetailsView, | 51 class AccessibilityDetailedView : public TrayDetailsView, |
53 public ViewClickListener, | |
54 public views::ButtonListener, | |
55 public ShellObserver { | 52 public ShellObserver { |
56 public: | 53 public: |
57 AccessibilityDetailedView(SystemTrayItem* owner, LoginStatus login); | 54 AccessibilityDetailedView(SystemTrayItem* owner, LoginStatus login); |
58 ~AccessibilityDetailedView() override {} | 55 ~AccessibilityDetailedView() override {} |
59 | 56 |
60 private: | 57 private: |
| 58 // TrayDetailsView: |
| 59 void HandleViewClicked(views::View* view) override; |
| 60 void HandleButtonPressed(views::Button* sender, |
| 61 const ui::Event& event) override; |
| 62 |
61 // Add the accessibility feature list. | 63 // Add the accessibility feature list. |
62 void AppendAccessibilityList(); | 64 void AppendAccessibilityList(); |
63 | 65 |
64 // Add help entries. | 66 // Add help entries. |
65 void AppendHelpEntries(); | 67 void AppendHelpEntries(); |
66 | 68 |
67 HoverHighlightView* AddScrollListItem(const base::string16& text, | 69 HoverHighlightView* AddScrollListItem(const base::string16& text, |
68 bool highlight, | 70 bool highlight, |
69 bool checked); | 71 bool checked); |
70 // Overridden from ViewClickListener. | |
71 void OnViewClicked(views::View* sender) override; | |
72 // Overridden from ButtonListener. | |
73 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | |
74 | 72 |
75 views::View* spoken_feedback_view_; | 73 views::View* spoken_feedback_view_; |
76 views::View* high_contrast_view_; | 74 views::View* high_contrast_view_; |
77 views::View* screen_magnifier_view_; | 75 views::View* screen_magnifier_view_; |
78 views::View* large_cursor_view_; | 76 views::View* large_cursor_view_; |
79 views::View* help_view_; | 77 views::View* help_view_; |
80 views::View* settings_view_; | 78 views::View* settings_view_; |
81 views::View* autoclick_view_; | 79 views::View* autoclick_view_; |
82 views::View* virtual_keyboard_view_; | 80 views::View* virtual_keyboard_view_; |
83 | 81 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // A11y feature status on just entering the lock screen. | 131 // A11y feature status on just entering the lock screen. |
134 bool show_a11y_menu_on_lock_screen_; | 132 bool show_a11y_menu_on_lock_screen_; |
135 | 133 |
136 friend class chromeos::TrayAccessibilityTest; | 134 friend class chromeos::TrayAccessibilityTest; |
137 DISALLOW_COPY_AND_ASSIGN(TrayAccessibility); | 135 DISALLOW_COPY_AND_ASSIGN(TrayAccessibility); |
138 }; | 136 }; |
139 | 137 |
140 } // namespace ash | 138 } // namespace ash |
141 | 139 |
142 #endif // ASH_COMMON_SYSTEM_TRAY_ACCESSIBILITY_H_ | 140 #endif // ASH_COMMON_SYSTEM_TRAY_ACCESSIBILITY_H_ |
OLD | NEW |