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

Side by Side Diff: ash/system/tray_accessibility.cc

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix single-letter typo :(. Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/tray_accessibility.h ('k') | ash/system/tray_caps_lock.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 };
59 59
60 TrayAccessibility::TrayAccessibility() 60 TrayAccessibility::TrayAccessibility(SystemTray* system_tray)
61 : TrayImageItem(IDR_AURA_UBER_TRAY_ACCESSIBILITY), 61 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_ACCESSIBILITY),
62 default_(NULL), 62 default_(NULL),
63 detailed_(NULL) { 63 detailed_(NULL) {
64 } 64 }
65 65
66 TrayAccessibility::~TrayAccessibility() {} 66 TrayAccessibility::~TrayAccessibility() {}
67 67
68 bool TrayAccessibility::GetInitialVisibility() { 68 bool TrayAccessibility::GetInitialVisibility() {
69 return Shell::GetInstance()->delegate() && 69 return Shell::GetInstance()->delegate() &&
70 Shell::GetInstance()->delegate()->IsSpokenFeedbackEnabled(); 70 Shell::GetInstance()->delegate()->IsSpokenFeedbackEnabled();
71 } 71 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ash/system/tray_accessibility.h ('k') | ash/system/tray_caps_lock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698