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 #include "ash/system/tray_accessibility.h" | 5 #include "ash/system/tray_accessibility.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
10 #include "ash/system/tray/tray_views.h" | 10 #include "ash/system/tray/tray_views.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 string16 label = bundle.GetLocalizedString( | 38 string16 label = bundle.GetLocalizedString( |
39 IDS_ASH_STATUS_TRAY_DISABLE_SPOKEN_FEEDBACK); | 39 IDS_ASH_STATUS_TRAY_DISABLE_SPOKEN_FEEDBACK); |
40 AddChildView(new views::Label(label)); | 40 AddChildView(new views::Label(label)); |
41 SetAccessibleName(label); | 41 SetAccessibleName(label); |
42 } | 42 } |
43 | 43 |
44 virtual ~DefaultAccessibilityView() {} | 44 virtual ~DefaultAccessibilityView() {} |
45 | 45 |
46 protected: | 46 protected: |
47 // Overridden from ActionableView. | 47 // Overridden from ActionableView. |
48 virtual bool PerformAction(const views::Event& event) OVERRIDE { | 48 virtual bool PerformAction(const ui::Event& event) OVERRIDE { |
49 if (Shell::GetInstance()->delegate()->IsSpokenFeedbackEnabled()) | 49 if (Shell::GetInstance()->delegate()->IsSpokenFeedbackEnabled()) |
50 Shell::GetInstance()->delegate()->ToggleSpokenFeedback(); | 50 Shell::GetInstance()->delegate()->ToggleSpokenFeedback(); |
51 GetWidget()->Close(); | 51 GetWidget()->Close(); |
52 return true; | 52 return true; |
53 } | 53 } |
54 | 54 |
55 private: | 55 private: |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(DefaultAccessibilityView); | 57 DISALLOW_COPY_AND_ASSIGN(DefaultAccessibilityView); |
58 }; | 58 }; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 if (enabled) { | 115 if (enabled) { |
116 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); | 116 PopupDetailedView(kTrayPopupAutoCloseDelayForTextInSeconds, false); |
117 } else if (detailed_) { | 117 } else if (detailed_) { |
118 detailed_->GetWidget()->Close(); | 118 detailed_->GetWidget()->Close(); |
119 } | 119 } |
120 } | 120 } |
121 | 121 |
122 } // namespace internal | 122 } // namespace internal |
123 } // namespace ash | 123 } // namespace ash |
OLD | NEW |