summaryrefslogtreecommitdiffstats
path: root/ash/system/audio/tray_volume.h
blob: 45b91ecb1c73eac840c25dbfdfa5ccec51239ebf (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
// Copyright (c) 2012 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_AUDIO_TRAY_VOLUME_H_
#define ASH_SYSTEM_AUDIO_TRAY_VOLUME_H_
#pragma once

#include "ash/system/audio/audio_controller.h"
#include "ash/system/tray/system_tray_item.h"
#include "base/memory/scoped_ptr.h"

namespace ash {
namespace internal {

namespace tray {
class VolumeView;
}

class TrayVolume : public SystemTrayItem,
                   public AudioController {
 public:
  TrayVolume();
  virtual ~TrayVolume();

 private:
  // Overridden from SystemTrayItem.
  virtual views::View* CreateTrayView() OVERRIDE;
  virtual views::View* CreateDefaultView() OVERRIDE;
  virtual views::View* CreateDetailedView() OVERRIDE;
  virtual void DestroyTrayView() OVERRIDE;
  virtual void DestroyDefaultView() OVERRIDE;
  virtual void DestroyDetailedView() OVERRIDE;

  // Overridden from AudioController.
  virtual void OnVolumeChanged(float percent) OVERRIDE;

  scoped_ptr<tray::VolumeView> volume_view_;

  DISALLOW_COPY_AND_ASSIGN(TrayVolume);
};

}  // namespace internal
}  // namespace ash

#endif  // ASH_SYSTEM_AUDIO_TRAY_VOLUME_H_