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