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

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

Issue 2041233005: Moves ash::user::LoginStatus to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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
« no previous file with comments | « ash/system/audio/tray_audio.h ('k') | ash/system/cast/tray_cast.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_audio.h" 5 #include "ash/system/audio/tray_audio.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/ash_constants.h" 10 #include "ash/ash_constants.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return true; 62 return true;
63 #else 63 #else
64 return false; 64 return false;
65 #endif 65 #endif
66 } 66 }
67 67
68 bool TrayAudio::GetInitialVisibility() { 68 bool TrayAudio::GetInitialVisibility() {
69 return audio_delegate_->IsOutputAudioMuted(); 69 return audio_delegate_->IsOutputAudioMuted();
70 } 70 }
71 71
72 views::View* TrayAudio::CreateDefaultView(user::LoginStatus status) { 72 views::View* TrayAudio::CreateDefaultView(LoginStatus status) {
73 volume_view_ = new tray::VolumeView(this, audio_delegate_.get(), true); 73 volume_view_ = new tray::VolumeView(this, audio_delegate_.get(), true);
74 return volume_view_; 74 return volume_view_;
75 } 75 }
76 76
77 views::View* TrayAudio::CreateDetailedView(user::LoginStatus status) { 77 views::View* TrayAudio::CreateDetailedView(LoginStatus status) {
78 volume_view_ = new tray::VolumeView(this, audio_delegate_.get(), false); 78 volume_view_ = new tray::VolumeView(this, audio_delegate_.get(), false);
79 return volume_view_; 79 return volume_view_;
80 } 80 }
81 81
82 void TrayAudio::DestroyDefaultView() { 82 void TrayAudio::DestroyDefaultView() {
83 volume_view_ = NULL; 83 volume_view_ = NULL;
84 } 84 }
85 85
86 void TrayAudio::DestroyDetailedView() { 86 void TrayAudio::DestroyDetailedView() {
87 if (volume_view_) { 87 if (volume_view_) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (tray_view()) 179 if (tray_view())
180 tray_view()->SetVisible(GetInitialVisibility()); 180 tray_view()->SetVisible(GetInitialVisibility());
181 if (volume_view_) { 181 if (volume_view_) {
182 volume_view_->SetVolumeLevel( 182 volume_view_->SetVolumeLevel(
183 static_cast<float>(audio_delegate_->GetOutputVolumeLevel()) / 100.0f); 183 static_cast<float>(audio_delegate_->GetOutputVolumeLevel()) / 100.0f);
184 volume_view_->Update(); 184 volume_view_->Update();
185 } 185 }
186 } 186 }
187 187
188 } // namespace ash 188 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/audio/tray_audio.h ('k') | ash/system/cast/tray_cast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698