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

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

Issue 620673002: Flip the left/right speaker when the device is in yoga mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change internal speaker channel mode OnDisplayAdded. Created 6 years, 2 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"
11 #include "ui/gfx/display_observer.h"
11 12
12 namespace ash { 13 namespace ash {
13 14
14 namespace system { 15 namespace system {
15 class TrayAudioDelegate; 16 class TrayAudioDelegate;
16 } 17 }
17 18
18 namespace tray { 19 namespace tray {
19 class VolumeView; 20 class VolumeView;
20 } 21 }
21 22
22 class TrayAudio : public TrayImageItem, 23 class TrayAudio : public TrayImageItem,
23 public AudioObserver { 24 public AudioObserver,
25 public gfx::DisplayObserver {
24 public: 26 public:
25 TrayAudio(SystemTray* system_tray, 27 TrayAudio(SystemTray* system_tray,
26 scoped_ptr<system::TrayAudioDelegate> audio_delegate); 28 scoped_ptr<system::TrayAudioDelegate> audio_delegate);
27 virtual ~TrayAudio(); 29 virtual ~TrayAudio();
28 30
29 static bool ShowAudioDeviceMenu(); 31 static bool ShowAudioDeviceMenu();
30 32
31 protected: 33 protected:
32 virtual void Update(); 34 virtual void Update();
33 35
(...skipping 16 matching lines...) Expand all
50 virtual bool ShouldHideArrow() const OVERRIDE; 52 virtual bool ShouldHideArrow() const OVERRIDE;
51 virtual bool ShouldShowShelf() const OVERRIDE; 53 virtual bool ShouldShowShelf() const OVERRIDE;
52 54
53 // Overridden from AudioObserver. 55 // Overridden from AudioObserver.
54 virtual void OnOutputVolumeChanged() OVERRIDE; 56 virtual void OnOutputVolumeChanged() OVERRIDE;
55 virtual void OnOutputMuteChanged() OVERRIDE; 57 virtual void OnOutputMuteChanged() OVERRIDE;
56 virtual void OnAudioNodesChanged() OVERRIDE; 58 virtual void OnAudioNodesChanged() OVERRIDE;
57 virtual void OnActiveOutputNodeChanged() OVERRIDE; 59 virtual void OnActiveOutputNodeChanged() OVERRIDE;
58 virtual void OnActiveInputNodeChanged() OVERRIDE; 60 virtual void OnActiveInputNodeChanged() OVERRIDE;
59 61
62 // Overridden from gfx::DisplayObserver.
63 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
64 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
65 virtual void OnDisplayMetricsChanged(const gfx::Display& display,
66 uint32_t changed_metrics) OVERRIDE;
67
68 void ChangeInternalSpeakerChannelMode();
69
60 DISALLOW_COPY_AND_ASSIGN(TrayAudio); 70 DISALLOW_COPY_AND_ASSIGN(TrayAudio);
61 }; 71 };
62 72
63 } // namespace ash 73 } // namespace ash
64 74
65 #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