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

Unified Diff: content/browser/time_zone_monitor_win.cc

Issue 193763002: Listen to WM_TIMECHANGE messages in RenderViewHostImpl on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: process host loop Created 6 years, 9 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 | « content/browser/time_zone_monitor_win.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+ }
+}
+
+}
« no previous file with comments | « content/browser/time_zone_monitor_win.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698