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

Unified Diff: ash/system/power/tray_power_date.h

Issue 9562008: ash uber tray: Add entry for power and date. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/power/tray_power_date.h
diff --git a/ash/system/power/tray_power_date.h b/ash/system/power/tray_power_date.h
new file mode 100644
index 0000000000000000000000000000000000000000..542714937e9f0a13607d803aad00d8cc7d286472
--- /dev/null
+++ b/ash/system/power/tray_power_date.h
@@ -0,0 +1,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() 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 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_

Powered by Google App Engine
This is Rietveld 408576698