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

Unified Diff: athena/system/time_view.h

Issue 483363003: [Athena] Add status icons and system time to the desktop background (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « athena/system/system_ui_impl.cc ('k') | athena/system/time_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/system/time_view.h
diff --git a/athena/system/time_view.h b/athena/system/time_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..7dc0bd4febc7495ab5926dec455d8b0a27db787c
--- /dev/null
+++ b/athena/system/time_view.h
@@ -0,0 +1,35 @@
+// 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 ATHENA_SYSTEM_TIME_VIEW_H_
+#define ATHENA_SYSTEM_TIME_VIEW_H_
+
+#include "athena/system/public/system_ui.h"
+#include "base/time/time.h"
+#include "base/timer/timer.h"
+#include "ui/views/controls/label.h"
+
+namespace athena {
+
+// View which displays the current time.
+class TimeView : public views::Label {
+ public:
+ TimeView();
+ virtual ~TimeView();
+
+ private:
+ // Starts |timer_| to schedule the next update.
+ void SetTimer(base::Time now);
+
+ // Updates the current time.
+ void UpdateText();
+
+ base::OneShotTimer<TimeView> timer_;
+
+ DISALLOW_COPY_AND_ASSIGN(TimeView);
+};
+
+} // namespace athena
+
+#endif // ATHENA_SYSTEM_TIME_VIEW_H_
« no previous file with comments | « athena/system/system_ui_impl.cc ('k') | athena/system/time_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698