Index: content/browser/time_zone_monitor_win.cc |
diff --git a/content/browser/time_zone_monitor_win.cc b/content/browser/time_zone_monitor_win.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..873650b794bd87313ae9b1f8c3aacdd88dec65cb |
--- /dev/null |
+++ b/content/browser/time_zone_monitor_win.cc |
@@ -0,0 +1,32 @@ |
+// Copyright (c) 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. |
+ |
+#include "content/browser/time_zone_monitor_win.h" |
+ |
+#include "content/public/browser/render_process_host.h" |
+ |
+namespace content { |
+ |
+TimeZoneMonitorWin::TimeZoneMonitorWin() { |
+ gfx::SingletonHwnd::GetInstance()->AddObserver(this); |
+} |
+ |
+TimeZoneMonitorWin::~TimeZoneMonitorWin() { |
+ gfx::SingletonHwnd::GetInstance()->RemoveObserver(this); |
+} |
+ |
+void TimeZoneMonitorWin::OnWndProc(HWND hwnd, |
+ UINT message, |
+ WPARAM wparam, |
+ LPARAM lparam) { |
+ if (message != WM_TIMECHANGE) |
+ return; |
+ |
+ for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator(); |
+ !it.IsAtEnd(); it.Advance()) { |
+ it.GetCurrentValue()->NotifyTimezoneChange(); |
+ } |
+} |
+ |
+} |