Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: ash/system/audio/tray_audio.h

Issue 1199413008: Work around for HDMI audio output rediscovering transistion loss. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/system/audio/tray_audio.cc » ('j') | ash/system/audio/tray_audio.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SYSTEM_AUDIO_TRAY_AUDIO_H_ 5 #ifndef ASH_SYSTEM_AUDIO_TRAY_AUDIO_H_
6 #define ASH_SYSTEM_AUDIO_TRAY_AUDIO_H_ 6 #define ASH_SYSTEM_AUDIO_TRAY_AUDIO_H_
7 7
8 #include "ash/system/audio/audio_observer.h" 8 #include "ash/system/audio/audio_observer.h"
9 #include "ash/system/tray/tray_image_item.h" 9 #include "ash/system/tray/tray_image_item.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 13 matching lines...) Expand all
24 public AudioObserver, 24 public AudioObserver,
25 public gfx::DisplayObserver { 25 public gfx::DisplayObserver {
26 public: 26 public:
27 TrayAudio(SystemTray* system_tray, 27 TrayAudio(SystemTray* system_tray,
28 scoped_ptr<system::TrayAudioDelegate> audio_delegate); 28 scoped_ptr<system::TrayAudioDelegate> audio_delegate);
29 ~TrayAudio() override; 29 ~TrayAudio() override;
30 30
31 static bool ShowAudioDeviceMenu(); 31 static bool ShowAudioDeviceMenu();
32 32
33 protected: 33 protected:
34 // Overridden from gfx::DisplayObserver.
35 void OnDisplayAdded(const gfx::Display& new_display) override;
36 void OnDisplayRemoved(const gfx::Display& old_display) override;
37 void OnDisplayMetricsChanged(const gfx::Display& display,
38 uint32_t changed_metrics) override;
39
34 virtual void Update(); 40 virtual void Update();
35 41
36 scoped_ptr<system::TrayAudioDelegate> audio_delegate_; 42 scoped_ptr<system::TrayAudioDelegate> audio_delegate_;
37 tray::VolumeView* volume_view_; 43 tray::VolumeView* volume_view_;
38 44
39 // True if VolumeView should be created for accelerator pop up; 45 // True if VolumeView should be created for accelerator pop up;
40 // Otherwise, it should be created for detailed view in ash tray bubble. 46 // Otherwise, it should be created for detailed view in ash tray bubble.
41 bool pop_up_volume_view_; 47 bool pop_up_volume_view_;
42 48
43 private: 49 private:
44 // Overridden from TrayImageItem. 50 // Overridden from TrayImageItem.
45 bool GetInitialVisibility() override; 51 bool GetInitialVisibility() override;
46 52
47 // Overridden from SystemTrayItem. 53 // Overridden from SystemTrayItem.
48 views::View* CreateDefaultView(user::LoginStatus status) override; 54 views::View* CreateDefaultView(user::LoginStatus status) override;
49 views::View* CreateDetailedView(user::LoginStatus status) override; 55 views::View* CreateDetailedView(user::LoginStatus status) override;
50 void DestroyDefaultView() override; 56 void DestroyDefaultView() override;
51 void DestroyDetailedView() override; 57 void DestroyDetailedView() override;
52 bool ShouldHideArrow() const override; 58 bool ShouldHideArrow() const override;
53 bool ShouldShowShelf() const override; 59 bool ShouldShowShelf() const override;
54 60
55 // Overridden from AudioObserver. 61 // Overridden from AudioObserver.
56 void OnOutputNodeVolumeChanged(uint64_t node_id, double volume) override; 62 void OnOutputNodeVolumeChanged(uint64_t node_id, double volume) override;
57 void OnOutputMuteChanged(bool mute_on) override; 63 void OnOutputMuteChanged(bool mute_on) override;
58 void OnAudioNodesChanged() override; 64 void OnAudioNodesChanged() override;
59 void OnActiveOutputNodeChanged() override; 65 void OnActiveOutputNodeChanged() override;
60 void OnActiveInputNodeChanged() override; 66 void OnActiveInputNodeChanged() override;
61 67
62 // Overridden from gfx::DisplayObserver.
63 void OnDisplayAdded(const gfx::Display& new_display) override;
64 void OnDisplayRemoved(const gfx::Display& old_display) override;
65 void OnDisplayMetricsChanged(const gfx::Display& display,
66 uint32_t changed_metrics) override;
67
68 void ChangeInternalSpeakerChannelMode(); 68 void ChangeInternalSpeakerChannelMode();
69 69
70 DISALLOW_COPY_AND_ASSIGN(TrayAudio); 70 DISALLOW_COPY_AND_ASSIGN(TrayAudio);
71 }; 71 };
72 72
73 } // namespace ash 73 } // namespace ash
74 74
75 #endif // ASH_SYSTEM_AUDIO_TRAY_AUDIO_H_ 75 #endif // ASH_SYSTEM_AUDIO_TRAY_AUDIO_H_
OLDNEW
« no previous file with comments | « no previous file | ash/system/audio/tray_audio.cc » ('j') | ash/system/audio/tray_audio.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698