summaryrefslogtreecommitdiffstats
path: root/ash/system/power/tray_power_date.h
blob: 5ca8606840bfde877db9d9a3e6fe7075fc80f1ae (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
// 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_POWER_TRAY_POWER_DATE_H_
#define ASH_SYSTEM_POWER_TRAY_POWER_DATE_H_
#pragma once

#include "ash/system/power/power_status_controller.h"
#include "ash/system/tray/system_tray_item.h"

namespace ash {
namespace internal {

namespace tray {
class DateView;
class PowerPopupView;
class PowerTrayView;
}

class TrayPowerDate : public SystemTrayItem,
                      public PowerStatusController {
 public:
  TrayPowerDate();
  virtual ~TrayPowerDate();

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

  // Overridden from PowerStatusController.
  virtual void OnPowerStatusChanged(const PowerSupplyStatus& status) OVERRIDE;

  scoped_ptr<tray::DateView> date_;
  scoped_ptr<tray::DateView> date_tray_;

  scoped_ptr<tray::PowerPopupView> power_;
  scoped_ptr<tray::PowerTrayView> power_tray_;

  DISALLOW_COPY_AND_ASSIGN(TrayPowerDate);
};

}  // namespace internal
}  // namespace ash

#endif  // ASH_SYSTEM_POWER_TRAY_POWER_DATE_H_