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