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

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

Issue 2761313003: Update appearance of Wi-Fi toggle notification. (Closed)
Patch Set: one more rename Created 3 years, 9 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 | « no previous file | ash/common/system/chromeos/brightness/tray_brightness.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 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/common/system/chromeos/audio/tray_audio.h" 5 #include "ash/common/system/chromeos/audio/tray_audio.h"
6 6
7 #include "ash/common/system/chromeos/audio/audio_detailed_view.h" 7 #include "ash/common/system/chromeos/audio/audio_detailed_view.h"
8 #include "ash/common/system/chromeos/audio/tray_audio_delegate_chromeos.h" 8 #include "ash/common/system/chromeos/audio/tray_audio_delegate_chromeos.h"
9 #include "ash/common/system/chromeos/audio/volume_view.h" 9 #include "ash/common/system/chromeos/audio/volume_view.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 static_cast<float>(audio_delegate_->GetOutputVolumeLevel()) / 100.0f; 101 static_cast<float>(audio_delegate_->GetOutputVolumeLevel()) / 100.0f;
102 if (tray_view()) 102 if (tray_view())
103 tray_view()->SetVisible(GetInitialVisibility()); 103 tray_view()->SetVisible(GetInitialVisibility());
104 104
105 if (volume_view_) { 105 if (volume_view_) {
106 volume_view_->SetVolumeLevel(percent); 106 volume_view_->SetVolumeLevel(percent);
107 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); 107 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
108 return; 108 return;
109 } 109 }
110 pop_up_volume_view_ = true; 110 pop_up_volume_view_ = true;
111 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); 111 ShowDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
112 } 112 }
113 113
114 void TrayAudio::OnOutputMuteChanged(bool /* mute_on */, bool system_adjust) { 114 void TrayAudio::OnOutputMuteChanged(bool /* mute_on */, bool system_adjust) {
115 if (tray_view()) 115 if (tray_view())
116 tray_view()->SetVisible(GetInitialVisibility()); 116 tray_view()->SetVisible(GetInitialVisibility());
117 117
118 if (volume_view_) { 118 if (volume_view_) {
119 volume_view_->Update(); 119 volume_view_->Update();
120 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); 120 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
121 } else if (!system_adjust) { 121 } else if (!system_adjust) {
122 pop_up_volume_view_ = true; 122 pop_up_volume_view_ = true;
123 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); 123 ShowDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
124 } 124 }
125 } 125 }
126 126
127 void TrayAudio::OnAudioNodesChanged() { 127 void TrayAudio::OnAudioNodesChanged() {
128 Update(); 128 Update();
129 } 129 }
130 130
131 void TrayAudio::OnActiveOutputNodeChanged() { 131 void TrayAudio::OnActiveOutputNodeChanged() {
132 Update(); 132 Update();
133 } 133 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 volume_view_->SetVolumeLevel( 200 volume_view_->SetVolumeLevel(
201 static_cast<float>(audio_delegate_->GetOutputVolumeLevel()) / 100.0f); 201 static_cast<float>(audio_delegate_->GetOutputVolumeLevel()) / 100.0f);
202 volume_view_->Update(); 202 volume_view_->Update();
203 } 203 }
204 204
205 if (audio_detail_view_) 205 if (audio_detail_view_)
206 audio_detail_view_->Update(); 206 audio_detail_view_->Update();
207 } 207 }
208 208
209 } // namespace ash 209 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/chromeos/brightness/tray_brightness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698