OLD | NEW |
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/chromeos/audio/tray_audio_chromeos.h" | 5 #include "ash/system/chromeos/audio/tray_audio_chromeos.h" |
6 | 6 |
7 #include "ash/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/system/audio/volume_view.h" | 9 #include "ash/system/audio/volume_view.h" |
10 #include "ash/system/chromeos/audio/audio_detailed_view.h" | 10 #include "ash/system/chromeos/audio/audio_detailed_view.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 this); | 31 this); |
32 } | 32 } |
33 | 33 |
34 void TrayAudioChromeOs::Update() { | 34 void TrayAudioChromeOs::Update() { |
35 TrayAudio::Update(); | 35 TrayAudio::Update(); |
36 | 36 |
37 if (audio_detail_view_) | 37 if (audio_detail_view_) |
38 audio_detail_view_->Update(); | 38 audio_detail_view_->Update(); |
39 } | 39 } |
40 | 40 |
41 views::View* TrayAudioChromeOs::CreateDetailedView(user::LoginStatus status) { | 41 views::View* TrayAudioChromeOs::CreateDetailedView(LoginStatus status) { |
42 if (pop_up_volume_view_) { | 42 if (pop_up_volume_view_) { |
43 volume_view_ = new tray::VolumeView(this, audio_delegate_.get(), false); | 43 volume_view_ = new tray::VolumeView(this, audio_delegate_.get(), false); |
44 return volume_view_; | 44 return volume_view_; |
45 } else { | 45 } else { |
46 Shell::GetInstance()->metrics()->RecordUserMetricsAction( | 46 Shell::GetInstance()->metrics()->RecordUserMetricsAction( |
47 ash::UMA_STATUS_AREA_DETAILED_AUDIO_VIEW); | 47 ash::UMA_STATUS_AREA_DETAILED_AUDIO_VIEW); |
48 audio_detail_view_ = new tray::AudioDetailedView(this); | 48 audio_detail_view_ = new tray::AudioDetailedView(this); |
49 return audio_detail_view_; | 49 return audio_detail_view_; |
50 } | 50 } |
51 } | 51 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 | 87 |
88 void TrayAudioChromeOs::SuspendDone(const base::TimeDelta& sleep_duration) { | 88 void TrayAudioChromeOs::SuspendDone(const base::TimeDelta& sleep_duration) { |
89 // This event is triggered when the device resumes after earlier suspension, | 89 // This event is triggered when the device resumes after earlier suspension, |
90 // we should always start or re-start HDMI re-discovering | 90 // we should always start or re-start HDMI re-discovering |
91 // grace period right after this event. | 91 // grace period right after this event. |
92 audio_delegate_->SetActiveHDMIOutoutRediscoveringIfNecessary(true); | 92 audio_delegate_->SetActiveHDMIOutoutRediscoveringIfNecessary(true); |
93 } | 93 } |
94 | 94 |
95 } // namespace ash | 95 } // namespace ash |
OLD | NEW |