Index: ash/common/system/audio/tray_audio.cc |
diff --git a/ash/common/system/audio/tray_audio.cc b/ash/common/system/audio/tray_audio.cc |
index 8ff0987aadc01be209d8ef02a09d83a1fd738b8a..f26777edf726b3b2cd8872d2d4a37ba538aab998 100644 |
--- a/ash/common/system/audio/tray_audio.cc |
+++ b/ash/common/system/audio/tray_audio.cc |
@@ -46,13 +46,17 @@ TrayAudio::TrayAudio(SystemTray* system_tray, |
audio_delegate_(std::move(audio_delegate)), |
volume_view_(NULL), |
pop_up_volume_view_(false) { |
- WmShell::Get()->system_tray_notifier()->AddAudioObserver(this); |
+ SystemTrayNotifier* notifier = WmShell::Get()->system_tray_notifier(); |
+ notifier->AddAudioObserver(this); |
+ notifier->AddMaximizeModeScreenshotObserver(this); |
display::Screen::GetScreen()->AddObserver(this); |
} |
TrayAudio::~TrayAudio() { |
display::Screen::GetScreen()->RemoveObserver(this); |
- WmShell::Get()->system_tray_notifier()->RemoveAudioObserver(this); |
+ SystemTrayNotifier* notifier = WmShell::Get()->system_tray_notifier(); |
+ notifier->RemoveMaximizeModeScreenshotObserver(this); |
+ notifier->RemoveAudioObserver(this); |
} |
// static |
@@ -138,6 +142,10 @@ void TrayAudio::OnActiveInputNodeChanged() { |
Update(); |
} |
+void TrayAudio::OnWillTakeScreenshotInMaximizeMode() { |
+ HideDetailedView(false); |
+} |
+ |
void TrayAudio::ChangeInternalSpeakerChannelMode() { |
// Swap left/right channel only if it is in Yoga mode. |
system::TrayAudioDelegate::AudioChannelMode channel_mode = |