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_AUDIO_TRAY_AUDIO_H_ | 5 #ifndef ASH_COMMON_SYSTEM_AUDIO_TRAY_AUDIO_H_ |
6 #define ASH_COMMON_SYSTEM_AUDIO_TRAY_AUDIO_H_ | 6 #define ASH_COMMON_SYSTEM_AUDIO_TRAY_AUDIO_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "ash/common/system/audio/audio_observer.h" | 12 #include "ash/common/system/audio/audio_observer.h" |
13 #include "ash/common/system/tray/tray_image_item.h" | 13 #include "ash/common/system/tray/tray_image_item.h" |
| 14 #include "ash/common/wm/maximize_mode/maximize_mode_screenshot_observer.h" |
14 #include "base/macros.h" | 15 #include "base/macros.h" |
15 #include "ui/display/display_observer.h" | 16 #include "ui/display/display_observer.h" |
16 | 17 |
17 namespace ash { | 18 namespace ash { |
18 | 19 |
19 namespace system { | 20 namespace system { |
20 class TrayAudioDelegate; | 21 class TrayAudioDelegate; |
21 } | 22 } |
22 | 23 |
23 namespace tray { | 24 namespace tray { |
24 class VolumeView; | 25 class VolumeView; |
25 } | 26 } |
26 | 27 |
27 class TrayAudio : public TrayImageItem, | 28 class TrayAudio : public TrayImageItem, |
28 public AudioObserver, | 29 public AudioObserver, |
29 public display::DisplayObserver { | 30 public display::DisplayObserver, |
| 31 public MaximizeModeScreenshotObserver { |
30 public: | 32 public: |
31 TrayAudio(SystemTray* system_tray, | 33 TrayAudio(SystemTray* system_tray, |
32 std::unique_ptr<system::TrayAudioDelegate> audio_delegate); | 34 std::unique_ptr<system::TrayAudioDelegate> audio_delegate); |
33 ~TrayAudio() override; | 35 ~TrayAudio() override; |
34 | 36 |
35 static bool ShowAudioDeviceMenu(); | 37 static bool ShowAudioDeviceMenu(); |
36 | 38 |
37 protected: | 39 protected: |
38 // Overridden from display::DisplayObserver. | 40 // Overridden from display::DisplayObserver. |
39 void OnDisplayAdded(const display::Display& new_display) override; | 41 void OnDisplayAdded(const display::Display& new_display) override; |
(...skipping 22 matching lines...) Expand all Loading... |
62 bool ShouldHideArrow() const override; | 64 bool ShouldHideArrow() const override; |
63 bool ShouldShowShelf() const override; | 65 bool ShouldShowShelf() const override; |
64 | 66 |
65 // Overridden from AudioObserver. | 67 // Overridden from AudioObserver. |
66 void OnOutputNodeVolumeChanged(uint64_t node_id, double volume) override; | 68 void OnOutputNodeVolumeChanged(uint64_t node_id, double volume) override; |
67 void OnOutputMuteChanged(bool mute_on, bool system_adjust) override; | 69 void OnOutputMuteChanged(bool mute_on, bool system_adjust) override; |
68 void OnAudioNodesChanged() override; | 70 void OnAudioNodesChanged() override; |
69 void OnActiveOutputNodeChanged() override; | 71 void OnActiveOutputNodeChanged() override; |
70 void OnActiveInputNodeChanged() override; | 72 void OnActiveInputNodeChanged() override; |
71 | 73 |
| 74 // Overridden from MaximizeModeScreenshotObserver. |
| 75 void OnWillTakeScreenshotInMaximizeMode() override; |
| 76 |
72 void ChangeInternalSpeakerChannelMode(); | 77 void ChangeInternalSpeakerChannelMode(); |
73 | 78 |
74 DISALLOW_COPY_AND_ASSIGN(TrayAudio); | 79 DISALLOW_COPY_AND_ASSIGN(TrayAudio); |
75 }; | 80 }; |
76 | 81 |
77 } // namespace ash | 82 } // namespace ash |
78 | 83 |
79 #endif // ASH_COMMON_SYSTEM_AUDIO_TRAY_AUDIO_H_ | 84 #endif // ASH_COMMON_SYSTEM_AUDIO_TRAY_AUDIO_H_ |
OLD | NEW |