Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: ash/common/system/tray_accessibility.h

Issue 2343603003: [Chrome OS MD] Implement accessibility detailed view for the MD Ash system menu (Closed)
Patch Set: ' Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/macros.h" 16 #include "base/macros.h"
17 #include "ui/gfx/font.h" 17 #include "ui/gfx/font.h"
18 #include "ui/views/controls/button/button.h" 18 #include "ui/views/controls/button/button.h"
19 19
20 namespace chromeos { 20 namespace chromeos {
21 class TrayAccessibilityTest; 21 class TrayAccessibilityTest;
22 } 22 }
23 23
24 namespace gfx {
25 struct VectorIcon;
26 }
27
24 namespace views { 28 namespace views {
25 class Button; 29 class Button;
26 class ImageView; 30 class ImageView;
27 class Label; 31 class Label;
28 class View; 32 class View;
29 } 33 }
30 34
31 namespace ash { 35 namespace ash {
32 class HoverHighlightView; 36 class HoverHighlightView;
33 class SystemTrayItem; 37 class SystemTrayItem;
34 38
35 namespace tray { 39 namespace tray {
36 40
37 class AccessibilityPopupView : public TrayNotificationView { 41 class AccessibilityPopupView : public TrayNotificationView {
38 public: 42 public:
39 AccessibilityPopupView(SystemTrayItem* owner, uint32_t enabled_state_bits); 43 AccessibilityPopupView(SystemTrayItem* owner, uint32_t enabled_state_bits);
40 44
41 const views::Label* label_for_test() const { return label_; } 45 const views::Label* label_for_test() const { return label_; }
42 46
43 private: 47 private:
44 views::Label* CreateLabel(uint32_t enabled_state_bits); 48 views::Label* CreateLabel(uint32_t enabled_state_bits);
45 49
46 views::Label* label_; 50 views::Label* label_;
47 51
48 DISALLOW_COPY_AND_ASSIGN(AccessibilityPopupView); 52 DISALLOW_COPY_AND_ASSIGN(AccessibilityPopupView);
49 }; 53 };
50 54
55 // Create the detailed view of accessibility tray.
51 class AccessibilityDetailedView : public TrayDetailsView, 56 class AccessibilityDetailedView : public TrayDetailsView,
52 public ShellObserver { 57 public ShellObserver {
53 public: 58 public:
54 AccessibilityDetailedView(SystemTrayItem* owner, LoginStatus login); 59 AccessibilityDetailedView(SystemTrayItem* owner, LoginStatus login);
55 ~AccessibilityDetailedView() override {} 60 ~AccessibilityDetailedView() override {}
56 61
57 private: 62 private:
58 // TrayDetailsView: 63 // TrayDetailsView:
59 void HandleViewClicked(views::View* view) override; 64 void HandleViewClicked(views::View* view) override;
60 void HandleButtonPressed(views::Button* sender, 65 void HandleButtonPressed(views::Button* sender,
61 const ui::Event& event) override; 66 const ui::Event& event) override;
62 67
63 // Add the accessibility feature list. 68 // Add the accessibility feature list.
64 void AppendAccessibilityList(); 69 void AppendAccessibilityList();
65 70
66 // Add help entries. 71 // Add help entries. Only used for non-MD.
67 void AppendHelpEntries(); 72 void AppendHelpEntries();
68 73
74 // Helper function to create entries in the detailed accessibility view. The
75 // |icon| parameter is used to create button icons for MD only.
69 HoverHighlightView* AddScrollListItem(const base::string16& text, 76 HoverHighlightView* AddScrollListItem(const base::string16& text,
70 bool highlight, 77 bool highlight,
71 bool checked); 78 bool checked,
79 const gfx::VectorIcon& icon);
72 80
73 views::View* spoken_feedback_view_; 81 views::View* spoken_feedback_view_;
74 views::View* high_contrast_view_; 82 views::View* high_contrast_view_;
75 views::View* screen_magnifier_view_; 83 views::View* screen_magnifier_view_;
76 views::View* large_cursor_view_; 84 views::View* large_cursor_view_;
77 views::View* help_view_; 85 views::View* help_view_;
78 views::View* settings_view_; 86 views::View* settings_view_;
79 views::View* autoclick_view_; 87 views::View* autoclick_view_;
80 views::View* virtual_keyboard_view_; 88 views::View* virtual_keyboard_view_;
81 89
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // A11y feature status on just entering the lock screen. 139 // A11y feature status on just entering the lock screen.
132 bool show_a11y_menu_on_lock_screen_; 140 bool show_a11y_menu_on_lock_screen_;
133 141
134 friend class chromeos::TrayAccessibilityTest; 142 friend class chromeos::TrayAccessibilityTest;
135 DISALLOW_COPY_AND_ASSIGN(TrayAccessibility); 143 DISALLOW_COPY_AND_ASSIGN(TrayAccessibility);
136 }; 144 };
137 145
138 } // namespace ash 146 } // namespace ash
139 147
140 #endif // ASH_COMMON_SYSTEM_TRAY_ACCESSIBILITY_H_ 148 #endif // ASH_COMMON_SYSTEM_TRAY_ACCESSIBILITY_H_
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/palette/common_palette_tool.cc ('k') | ash/common/system/tray_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698