Chromium Code Reviews| 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 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_H_ |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
|
James Cook
2017/03/25 03:45:06
nit: not needed
mohsen
2017/03/27 22:22:18
Removed.
| |
| 11 | 11 |
| 12 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
| 13 #include "ash/common/system/tray/tray_image_item.h" | 13 #include "ash/common/system/tray/tray_image_item.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "chromeos/audio/cras_audio_handler.h" | 15 #include "chromeos/audio/cras_audio_handler.h" |
| 16 #include "chromeos/dbus/power_manager_client.h" | 16 #include "chromeos/dbus/power_manager_client.h" |
| 17 #include "ui/display/display_observer.h" | 17 #include "ui/display/display_observer.h" |
| 18 | 18 |
| 19 namespace ash { | 19 namespace ash { |
| 20 | 20 |
| 21 namespace system { | |
| 22 class TrayAudioDelegate; | |
| 23 } | |
| 24 | |
| 25 namespace tray { | 21 namespace tray { |
| 26 class AudioDetailedView; | 22 class AudioDetailedView; |
| 27 class VolumeView; | 23 class VolumeView; |
| 28 } | 24 } |
| 29 | 25 |
| 30 // The system tray item for audio input and output. | 26 // The system tray item for audio input and output. |
| 31 class ASH_EXPORT TrayAudio : public TrayImageItem, | 27 class ASH_EXPORT TrayAudio : public TrayImageItem, |
| 32 public chromeos::CrasAudioHandler::AudioObserver, | 28 public chromeos::CrasAudioHandler::AudioObserver, |
| 33 public display::DisplayObserver, | 29 public display::DisplayObserver, |
| 34 public chromeos::PowerManagerClient::Observer { | 30 public chromeos::PowerManagerClient::Observer { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 | 65 |
| 70 // Overridden from chromeos::PowerManagerClient::Observer. | 66 // Overridden from chromeos::PowerManagerClient::Observer. |
| 71 void SuspendDone(const base::TimeDelta& sleep_duration) override; | 67 void SuspendDone(const base::TimeDelta& sleep_duration) override; |
| 72 | 68 |
| 73 // Swaps the left and right channels on yoga devices based on orientation. | 69 // Swaps the left and right channels on yoga devices based on orientation. |
| 74 void ChangeInternalSpeakerChannelMode(); | 70 void ChangeInternalSpeakerChannelMode(); |
| 75 | 71 |
| 76 // Updates the UI views. | 72 // Updates the UI views. |
| 77 void Update(); | 73 void Update(); |
| 78 | 74 |
| 79 // TODO(jamescook): Remove this delegate and inline all the code. | |
| 80 std::unique_ptr<system::TrayAudioDelegate> audio_delegate_; | |
| 81 tray::VolumeView* volume_view_; | 75 tray::VolumeView* volume_view_; |
| 82 | 76 |
| 83 // True if VolumeView should be created for accelerator pop up; | 77 // True if VolumeView should be created for accelerator pop up; |
| 84 // Otherwise, it should be created for detailed view in ash tray bubble. | 78 // Otherwise, it should be created for detailed view in ash tray bubble. |
| 85 bool pop_up_volume_view_; | 79 bool pop_up_volume_view_; |
| 86 | 80 |
| 87 tray::AudioDetailedView* audio_detail_view_; | 81 tray::AudioDetailedView* audio_detail_view_; |
| 88 | 82 |
| 89 DISALLOW_COPY_AND_ASSIGN(TrayAudio); | 83 DISALLOW_COPY_AND_ASSIGN(TrayAudio); |
| 90 }; | 84 }; |
| 91 | 85 |
| 92 } // namespace ash | 86 } // namespace ash |
| 93 | 87 |
| 94 #endif // ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_H_ | 88 #endif // ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_H_ |
| OLD | NEW |