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

Side by Side Diff: athena/system/time_view.h

Issue 483033003: [Athena] Add status icons and system time to the centered home card (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « athena/system/system_ui_impl.cc ('k') | athena/system/time_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ATHENA_SYSTEM_TIME_VIEW_H_ 5 #ifndef ATHENA_SYSTEM_TIME_VIEW_H_
6 #define ATHENA_SYSTEM_TIME_VIEW_H_ 6 #define ATHENA_SYSTEM_TIME_VIEW_H_
7 7
8 #include "athena/system/public/system_ui.h" 8 #include "athena/system/public/system_ui.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
11 #include "ui/views/controls/label.h" 11 #include "ui/views/controls/label.h"
12 12
13 namespace athena { 13 namespace athena {
14 14
15 // View which displays the current time. 15 // View which displays the current time.
16 class TimeView : public views::Label { 16 class TimeView : public views::Label {
17 public: 17 public:
18 TimeView(); 18 explicit TimeView(SystemUI::ColorScheme color_scheme);
19 virtual ~TimeView(); 19 virtual ~TimeView();
20 20
21 private: 21 private:
22 // Starts |timer_| to schedule the next update. 22 // Starts |timer_| to schedule the next update.
23 void SetTimer(base::Time now); 23 void SetTimer(base::Time now);
24 24
25 // Updates the current time. 25 // Updates the current time.
26 void UpdateText(); 26 void UpdateText();
27 27
28 base::OneShotTimer<TimeView> timer_; 28 base::OneShotTimer<TimeView> timer_;
29 29
30 DISALLOW_COPY_AND_ASSIGN(TimeView); 30 DISALLOW_COPY_AND_ASSIGN(TimeView);
31 }; 31 };
32 32
33 } // namespace athena 33 } // namespace athena
34 34
35 #endif // ATHENA_SYSTEM_TIME_VIEW_H_ 35 #endif // ATHENA_SYSTEM_TIME_VIEW_H_
OLDNEW
« 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