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

Side by Side Diff: ash/system/audio/tray_volume.cc

Issue 9969068: ash: Animate changes in the uber tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 months 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/ash.gyp ('k') | ash/system/date/tray_date.cc » ('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/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
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
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/system/date/tray_date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698