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

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

Issue 1268593002: Fix the UI issue for showing output muted in ash tray after the device wakes up with hdmi output re… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: Created 5 years, 4 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/tray/system_tray_notifier.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 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 if (volume_view_) { 107 if (volume_view_) {
108 volume_view_->SetVolumeLevel(percent); 108 volume_view_->SetVolumeLevel(percent);
109 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); 109 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
110 return; 110 return;
111 } 111 }
112 pop_up_volume_view_ = true; 112 pop_up_volume_view_ = true;
113 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); 113 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
114 } 114 }
115 115
116 void TrayAudio::OnOutputMuteChanged(bool /* mute_on */) { 116 void TrayAudio::OnOutputMuteChanged(bool /* mute_on */, bool system_adjust) {
117 if (tray_view()) 117 if (tray_view())
118 tray_view()->SetVisible(GetInitialVisibility()); 118 tray_view()->SetVisible(GetInitialVisibility());
119 119
120 if (volume_view_) { 120 if (volume_view_) {
121 volume_view_->Update(); 121 volume_view_->Update();
122 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); 122 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
123 } else { 123 } else if (!system_adjust) {
124 pop_up_volume_view_ = true; 124 pop_up_volume_view_ = true;
125 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); 125 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
126 } 126 }
127 } 127 }
128 128
129 void TrayAudio::OnAudioNodesChanged() { 129 void TrayAudio::OnAudioNodesChanged() {
130 Update(); 130 Update();
131 } 131 }
132 132
133 void TrayAudio::OnActiveOutputNodeChanged() { 133 void TrayAudio::OnActiveOutputNodeChanged() {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 if (tray_view()) 178 if (tray_view())
179 tray_view()->SetVisible(GetInitialVisibility()); 179 tray_view()->SetVisible(GetInitialVisibility());
180 if (volume_view_) { 180 if (volume_view_) {
181 volume_view_->SetVolumeLevel( 181 volume_view_->SetVolumeLevel(
182 static_cast<float>(audio_delegate_->GetOutputVolumeLevel()) / 100.0f); 182 static_cast<float>(audio_delegate_->GetOutputVolumeLevel()) / 100.0f);
183 volume_view_->Update(); 183 volume_view_->Update();
184 } 184 }
185 } 185 }
186 186
187 } // namespace ash 187 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/audio/tray_audio.h ('k') | ash/system/tray/system_tray_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698