| 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" |
| 11 #include "ash/system/chromeos/audio/tray_audio_delegate_chromeos.h" | 11 #include "ash/system/chromeos/audio/tray_audio_delegate_chromeos.h" |
| 12 #include "chromeos/dbus/dbus_thread_manager.h" | 12 #include "chromeos/dbus/dbus_thread_manager.h" |
| 13 #include "ui/views/view.h" | 13 #include "ui/views/view.h" |
| 14 | 14 |
| 15 namespace ash { | 15 namespace ash { |
| 16 | 16 |
| 17 using system::TrayAudioDelegate; | 17 using system::TrayAudioDelegate; |
| 18 using system::TrayAudioDelegateChromeOs; | 18 using system::TrayAudioDelegateChromeOs; |
| 19 | 19 |
| 20 TrayAudioChromeOs::TrayAudioChromeOs(SystemTray* system_tray) | 20 TrayAudioChromeOs::TrayAudioChromeOs(SystemTray* system_tray) |
| 21 : TrayAudio(system_tray, | 21 : TrayAudio( |
| 22 scoped_ptr<TrayAudioDelegate>(new TrayAudioDelegateChromeOs())), | 22 system_tray, |
| 23 std::unique_ptr<TrayAudioDelegate>(new TrayAudioDelegateChromeOs())), |
| 23 audio_detail_view_(NULL) { | 24 audio_detail_view_(NULL) { |
| 24 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( | 25 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( |
| 25 this); | 26 this); |
| 26 } | 27 } |
| 27 | 28 |
| 28 TrayAudioChromeOs::~TrayAudioChromeOs() { | 29 TrayAudioChromeOs::~TrayAudioChromeOs() { |
| 29 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver( | 30 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver( |
| 30 this); | 31 this); |
| 31 } | 32 } |
| 32 | 33 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 86 } |
| 86 | 87 |
| 87 void TrayAudioChromeOs::SuspendDone(const base::TimeDelta& sleep_duration) { | 88 void TrayAudioChromeOs::SuspendDone(const base::TimeDelta& sleep_duration) { |
| 88 // This event is triggered when the device resumes after earlier suspension, | 89 // This event is triggered when the device resumes after earlier suspension, |
| 89 // we should always start or re-start HDMI re-discovering | 90 // we should always start or re-start HDMI re-discovering |
| 90 // grace period right after this event. | 91 // grace period right after this event. |
| 91 audio_delegate_->SetActiveHDMIOutoutRediscoveringIfNecessary(true); | 92 audio_delegate_->SetActiveHDMIOutoutRediscoveringIfNecessary(true); |
| 92 } | 93 } |
| 93 | 94 |
| 94 } // namespace ash | 95 } // namespace ash |
| OLD | NEW |