| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| 228 | 228 |
| 229 views::View* TrayVolume::CreateDefaultView(user::LoginStatus status) { | 229 views::View* TrayVolume::CreateDefaultView(user::LoginStatus status, |
| 230 int bubble_width) { |
| 230 volume_view_ = new tray::VolumeView; | 231 volume_view_ = new tray::VolumeView; |
| 231 is_default_view_ = true; | 232 is_default_view_ = true; |
| 232 return volume_view_; | 233 return volume_view_; |
| 233 } | 234 } |
| 234 | 235 |
| 235 views::View* TrayVolume::CreateDetailedView(user::LoginStatus status) { | 236 views::View* TrayVolume::CreateDetailedView(user::LoginStatus status) { |
| 236 volume_view_ = new tray::VolumeView; | 237 volume_view_ = new tray::VolumeView; |
| 237 is_default_view_ = false; | 238 is_default_view_ = false; |
| 238 return volume_view_; | 239 return volume_view_; |
| 239 } | 240 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 tray_view()->SetVisible(GetInitialVisibility()); | 272 tray_view()->SetVisible(GetInitialVisibility()); |
| 272 | 273 |
| 273 if (volume_view_) | 274 if (volume_view_) |
| 274 volume_view_->Update(); | 275 volume_view_->Update(); |
| 275 else | 276 else |
| 276 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); | 277 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); |
| 277 } | 278 } |
| 278 | 279 |
| 279 } // namespace internal | 280 } // namespace internal |
| 280 } // namespace ash | 281 } // namespace ash |
| OLD | NEW |