summaryrefslogtreecommitdiffstats
path: root/ash/system/chromeos/audio/tray_audio_chromeos.h
blob: 2397309089c437178302a2b6f76d4aa46c6394b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_CHROMEOS_H_
#define ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_CHROMEOS_H_

#include <stdint.h>

#include "ash/ash_export.h"
#include "ash/system/audio/tray_audio.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "chromeos/dbus/power_manager_client.h"

namespace ash {
namespace tray {
class AudioDetailedView;
}

class ASH_EXPORT TrayAudioChromeOs
    : public TrayAudio,
      public chromeos::PowerManagerClient::Observer {
 public:
  explicit TrayAudioChromeOs(SystemTray* system_tray);
  ~TrayAudioChromeOs() override;

 protected:
  // Overridden from TrayAudio
  void Update() override;

 private:
  // Overridden from SystemTrayItem.
  views::View* CreateDetailedView(user::LoginStatus status) override;
  void DestroyDetailedView() override;

  // Overridden from gfx::DisplayObserver.
  void OnDisplayAdded(const gfx::Display& new_display) override;
  void OnDisplayRemoved(const gfx::Display& old_display) override;
  void OnDisplayMetricsChanged(const gfx::Display& display,
                               uint32_t changed_metrics) override;

  // Overriden from chromeos::PowerManagerClient::Observer.
  void SuspendDone(const base::TimeDelta& sleep_duration) override;

  tray::AudioDetailedView* audio_detail_view_;

  DISALLOW_COPY_AND_ASSIGN(TrayAudioChromeOs);
};

}  // namespace ash

#endif  // ASH_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_CHROMEOS_H_