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_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_CHROMEOS_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_CHROMEOS_H_ |
6 #define ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_CHROMEOS_H_ | 6 #define ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_CHROMEOS_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/system/audio/tray_audio.h" | 9 #include "ash/system/audio/tray_audio.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "chromeos/dbus/power_manager_client.h" | |
11 | 12 |
12 namespace ash { | 13 namespace ash { |
13 namespace tray { | 14 namespace tray { |
14 class AudioDetailedView; | 15 class AudioDetailedView; |
15 } | 16 } |
16 | 17 |
17 class ASH_EXPORT TrayAudioChromeOs : public TrayAudio { | 18 class ASH_EXPORT TrayAudioChromeOs |
19 : public TrayAudio, | |
20 public chromeos::PowerManagerClient::Observer { | |
18 public: | 21 public: |
19 explicit TrayAudioChromeOs(SystemTray* system_tray); | 22 explicit TrayAudioChromeOs(SystemTray* system_tray); |
20 ~TrayAudioChromeOs() override; | 23 ~TrayAudioChromeOs() override; |
21 | 24 |
22 protected: | 25 protected: |
23 // Overridden from TrayAudio | 26 // Overridden from TrayAudio |
24 void Update() override; | 27 void Update() override; |
25 | 28 |
26 private: | 29 private: |
27 // Overridden from SystemTrayItem. | 30 // Overridden from SystemTrayItem. |
28 views::View* CreateDetailedView(user::LoginStatus status) override; | 31 views::View* CreateDetailedView(user::LoginStatus status) override; |
29 void DestroyDetailedView() override; | 32 void DestroyDetailedView() override; |
30 | 33 |
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 | |
40 // Overriden from chromeos::PowerManagerClient::Observer. | |
cychiang
2015/06/26 10:00:21
Overridden
| |
41 void SuspendDone(const base::TimeDelta& sleep_duration) override; | |
42 | |
31 tray::AudioDetailedView* audio_detail_view_; | 43 tray::AudioDetailedView* audio_detail_view_; |
32 | 44 |
33 DISALLOW_COPY_AND_ASSIGN(TrayAudioChromeOs); | 45 DISALLOW_COPY_AND_ASSIGN(TrayAudioChromeOs); |
34 }; | 46 }; |
35 | 47 |
36 } // namespace ash | 48 } // namespace ash |
37 | 49 |
38 #endif // ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_CHROMEOS_H_ | 50 #endif // ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_CHROMEOS_H_ |
OLD | NEW |