OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/browser/time_zone_monitor_win.h" |
| 6 |
| 7 #include "content/public/browser/render_process_host.h" |
| 8 |
| 9 namespace content { |
| 10 |
| 11 TimeZoneMonitorWin::TimeZoneMonitorWin() { |
| 12 gfx::SingletonHwnd::GetInstance()->AddObserver(this); |
| 13 } |
| 14 |
| 15 TimeZoneMonitorWin::~TimeZoneMonitorWin() { |
| 16 gfx::SingletonHwnd::GetInstance()->RemoveObserver(this); |
| 17 } |
| 18 |
| 19 void TimeZoneMonitorWin::OnWndProc(HWND hwnd, |
| 20 UINT message, |
| 21 WPARAM wparam, |
| 22 LPARAM lparam) { |
| 23 if (message != WM_TIMECHANGE) |
| 24 return; |
| 25 |
| 26 for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator(); |
| 27 !it.IsAtEnd(); it.Advance()) { |
| 28 it.GetCurrentValue()->NotifyTimezoneChange(); |
| 29 } |
| 30 } |
| 31 |
| 32 } |
OLD | NEW |