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 <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "ash/ash_constants.h" | 9 #include "ash/ash_constants.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 VolumeButton* icon_; | 207 VolumeButton* icon_; |
208 MuteButton* mute_; | 208 MuteButton* mute_; |
209 VolumeSlider* slider_; | 209 VolumeSlider* slider_; |
210 | 210 |
211 DISALLOW_COPY_AND_ASSIGN(VolumeView); | 211 DISALLOW_COPY_AND_ASSIGN(VolumeView); |
212 }; | 212 }; |
213 | 213 |
214 } // namespace tray | 214 } // namespace tray |
215 | 215 |
216 TrayVolume::TrayVolume() | 216 TrayVolume::TrayVolume(SystemTray* system_tray) |
217 : TrayImageItem(IDR_AURA_UBER_TRAY_VOLUME_MUTE), | 217 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_VOLUME_MUTE), |
218 volume_view_(NULL), | 218 volume_view_(NULL), |
219 is_default_view_(false) { | 219 is_default_view_(false) { |
220 } | 220 } |
221 | 221 |
222 TrayVolume::~TrayVolume() { | 222 TrayVolume::~TrayVolume() { |
223 } | 223 } |
224 | 224 |
225 bool TrayVolume::GetInitialVisibility() { | 225 bool TrayVolume::GetInitialVisibility() { |
226 return IsAudioMuted(); | 226 return IsAudioMuted(); |
227 } | 227 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 tray_view()->SetVisible(GetInitialVisibility()); | 271 tray_view()->SetVisible(GetInitialVisibility()); |
272 | 272 |
273 if (volume_view_) | 273 if (volume_view_) |
274 volume_view_->Update(); | 274 volume_view_->Update(); |
275 else | 275 else |
276 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); | 276 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); |
277 } | 277 } |
278 | 278 |
279 } // namespace internal | 279 } // namespace internal |
280 } // namespace ash | 280 } // namespace ash |
OLD | NEW |