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/audio/tray_volume.h" | 5 #include "ash/system/audio/tray_volume.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 if (is_default_view_) | 185 if (is_default_view_) |
186 volume_view_.reset(); | 186 volume_view_.reset(); |
187 } | 187 } |
188 | 188 |
189 void TrayVolume::DestroyDetailedView() { | 189 void TrayVolume::DestroyDetailedView() { |
190 if (!is_default_view_) | 190 if (!is_default_view_) |
191 volume_view_.reset(); | 191 volume_view_.reset(); |
192 } | 192 } |
193 | 193 |
194 void TrayVolume::OnVolumeChanged(float percent) { | 194 void TrayVolume::OnVolumeChanged(float percent) { |
195 if (image_view()) | 195 if (tray_view()) |
196 image_view()->SetVisible(GetInitialVisibility()); | 196 tray_view()->SetVisible(GetInitialVisibility()); |
197 | 197 |
198 if (volume_view_.get()) { | 198 if (volume_view_.get()) { |
199 volume_view_->SetVolumeLevel(percent); | 199 volume_view_->SetVolumeLevel(percent); |
200 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); | 200 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); |
201 return; | 201 return; |
202 } | 202 } |
203 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); | 203 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); |
204 } | 204 } |
205 | 205 |
206 } // namespace internal | 206 } // namespace internal |
207 } // namespace ash | 207 } // namespace ash |
OLD | NEW |