Chromium Code Reviews| 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 "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; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 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 |
| 51 class AccessibilityDetailedView : public TrayDetailsView, | 55 class AccessibilityDetailedView : public TrayDetailsView, |
| 52 public ShellObserver { | 56 public ShellObserver { |
| 53 public: | 57 public: |
| 58 // Create the detailed view of accessibility tray. Note that the help option | |
|
tdanderson
2016/09/19 23:32:27
Generally a comment directly above a constructor s
yiyix
2016/09/21 17:10:48
I put the first sentence as a class description to
| |
| 59 // row will be shown in non-MD version only and it will be integrated to the | |
| 60 // title row in MD. | |
| 54 AccessibilityDetailedView(SystemTrayItem* owner, LoginStatus login); | 61 AccessibilityDetailedView(SystemTrayItem* owner, LoginStatus login); |
| 55 ~AccessibilityDetailedView() override {} | 62 ~AccessibilityDetailedView() override {} |
| 56 | 63 |
| 57 private: | 64 private: |
| 58 // TrayDetailsView: | 65 // TrayDetailsView: |
| 59 void HandleViewClicked(views::View* view) override; | 66 void HandleViewClicked(views::View* view) override; |
| 60 void HandleButtonPressed(views::Button* sender, | 67 void HandleButtonPressed(views::Button* sender, |
| 61 const ui::Event& event) override; | 68 const ui::Event& event) override; |
| 62 | 69 |
| 63 // Add the accessibility feature list. | 70 // Add the accessibility feature list. |
| 64 void AppendAccessibilityList(); | 71 void AppendAccessibilityList(); |
| 65 | 72 |
| 66 // Add help entries. | 73 // Add help entries. |
| 67 void AppendHelpEntries(); | 74 void AppendHelpEntries(); |
| 68 | 75 |
| 76 // Helper function to create entries in the detailed accessibility view. | |
|
tdanderson
2016/09/19 23:32:27
nit: Maybe mention that the |icon| parameter is on
yiyix
2016/09/21 17:10:48
Done.
| |
| 69 HoverHighlightView* AddScrollListItem(const base::string16& text, | 77 HoverHighlightView* AddScrollListItem(const base::string16& text, |
| 70 bool highlight, | 78 bool highlight, |
| 71 bool checked); | 79 bool checked, |
| 80 const gfx::VectorIcon& icon); | |
| 72 | 81 |
| 73 views::View* spoken_feedback_view_; | 82 views::View* spoken_feedback_view_; |
| 74 views::View* high_contrast_view_; | 83 views::View* high_contrast_view_; |
| 75 views::View* screen_magnifier_view_; | 84 views::View* screen_magnifier_view_; |
| 76 views::View* large_cursor_view_; | 85 views::View* large_cursor_view_; |
| 77 views::View* help_view_; | 86 views::View* help_view_; |
| 78 views::View* settings_view_; | 87 views::View* settings_view_; |
| 79 views::View* autoclick_view_; | 88 views::View* autoclick_view_; |
| 80 views::View* virtual_keyboard_view_; | 89 views::View* virtual_keyboard_view_; |
| 81 | 90 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 // A11y feature status on just entering the lock screen. | 140 // A11y feature status on just entering the lock screen. |
| 132 bool show_a11y_menu_on_lock_screen_; | 141 bool show_a11y_menu_on_lock_screen_; |
| 133 | 142 |
| 134 friend class chromeos::TrayAccessibilityTest; | 143 friend class chromeos::TrayAccessibilityTest; |
| 135 DISALLOW_COPY_AND_ASSIGN(TrayAccessibility); | 144 DISALLOW_COPY_AND_ASSIGN(TrayAccessibility); |
| 136 }; | 145 }; |
| 137 | 146 |
| 138 } // namespace ash | 147 } // namespace ash |
| 139 | 148 |
| 140 #endif // ASH_COMMON_SYSTEM_TRAY_ACCESSIBILITY_H_ | 149 #endif // ASH_COMMON_SYSTEM_TRAY_ACCESSIBILITY_H_ |
| OLD | NEW |