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

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

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 | « ash/system/date/date_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/date/date_view.cc
diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc
index f303f73a37c383c77e9f948ceead97c2edb9ebfb..97669f17b7c735c21700674b9dc13f51c70616aa 100644
--- a/ash/system/date/date_view.cc
+++ b/ash/system/date/date_view.cc
@@ -60,10 +60,16 @@ BaseDateTimeView::~BaseDateTimeView() {
void BaseDateTimeView::UpdateText() {
base::Time now = base::Time::Now();
- gfx::Size old_size = GetPreferredSize();
UpdateTextInternal(now);
SchedulePaint();
+ SetTimer(now);
+}
+
+BaseDateTimeView::BaseDateTimeView() {
+ SetTimer(base::Time::Now());
+}
+void BaseDateTimeView::SetTimer(const base::Time& now) {
// Try to set the timer to go off at the next change of the minute. We don't
// want to have the timer go off more than necessary since that will cause
// the CPU to wake up and consume power.
@@ -86,9 +92,6 @@ void BaseDateTimeView::UpdateText() {
this, &BaseDateTimeView::UpdateText);
}
-BaseDateTimeView::BaseDateTimeView() {
-}
-
void BaseDateTimeView::ChildPreferredSizeChanged(views::View* child) {
views::View::PreferredSizeChanged();
if (GetWidget())
« no previous file with comments | « ash/system/date/date_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698