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

Unified Diff: ash/system/date/date_view.h

Issue 10352022: ash: Fix regression where system tray clock wasn't updated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update a comment Created 8 years, 8 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 | « no previous file | ash/system/date/date_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/date/date_view.h
diff --git a/ash/system/date/date_view.h b/ash/system/date/date_view.h
index 881c22ad6f1a651a108588d04b9e167921efda12..6ed3ac125875f728e97acbbb6e93b030831da68d 100644
--- a/ash/system/date/date_view.h
+++ b/ash/system/date/date_view.h
@@ -25,13 +25,16 @@ class BaseDateTimeView : public ActionableView {
public:
virtual ~BaseDateTimeView();
- // Updates the displayed text for the current time.
+ // Updates the displayed text for the current time and calls SetTimer().
void UpdateText();
protected:
BaseDateTimeView();
private:
+ // Starts |timer_| to schedule the next update.
+ void SetTimer(const base::Time& now);
+
// Updates labels to display the current time.
virtual void UpdateTextInternal(const base::Time& now) = 0;
@@ -39,6 +42,7 @@ class BaseDateTimeView : public ActionableView {
virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
virtual void OnLocaleChanged() OVERRIDE;
+ // Invokes UpdateText() when the displayed time should change.
base::OneShotTimer<BaseDateTimeView> timer_;
DISALLOW_COPY_AND_ASSIGN(BaseDateTimeView);
« no previous file with comments | « no previous file | ash/system/date/date_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698