diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-26 19:48:34 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-26 19:48:34 +0000 |
commit | 097ae5a93a863b604fd6dbd939bed0c2be1afed2 (patch) | |
tree | 61177362b1c1bd2d1b2438acc50ccb2c061b176e /views | |
parent | 902c971382790170852fe5b5d22d1b79adb31056 (diff) | |
download | chromium_src-097ae5a93a863b604fd6dbd939bed0c2be1afed2.zip chromium_src-097ae5a93a863b604fd6dbd939bed0c2be1afed2.tar.gz chromium_src-097ae5a93a863b604fd6dbd939bed0c2be1afed2.tar.bz2 |
Make SystemMonitor not a Singleton and move it out of base
SystemMonitor makes an assumption that through its lifetime a MessageLoop exists and stays the same. It is difficult and error-prone to satisfy that when it is a Singleton. It has caused problems in the past.
Additionally, extract HighResoltionTimerManager out of time_win.cc, eliminating yet another Singleton.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/431008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/widget/widget_win.cc | 3 | ||||
-rw-r--r-- | views/widget/widget_win.h | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc index 79956a8..892d47f 100644 --- a/views/widget/widget_win.cc +++ b/views/widget/widget_win.cc @@ -8,6 +8,7 @@ #include "app/gfx/native_theme_win.h" #include "app/gfx/path.h" #include "app/l10n_util_win.h" +#include "app/system_monitor.h" #include "app/win_util.h" #include "base/string_util.h" #include "base/win_util.h" @@ -770,7 +771,7 @@ void WidgetWin::OnPaint(HDC dc) { } LRESULT WidgetWin::OnPowerBroadcast(DWORD power_event, DWORD data) { - base::SystemMonitor* monitor = base::SystemMonitor::Get(); + SystemMonitor* monitor = SystemMonitor::Get(); if (monitor) monitor->ProcessWmPowerBroadcastMessage(power_event); SetMsgHandled(FALSE); diff --git a/views/widget/widget_win.h b/views/widget/widget_win.h index 3f06ca3..43c4357 100644 --- a/views/widget/widget_win.h +++ b/views/widget/widget_win.h @@ -13,7 +13,6 @@ #include "app/win/window_impl.h" #include "base/message_loop.h" #include "base/scoped_comptr_win.h" -#include "base/system_monitor.h" #include "views/focus/focus_manager.h" #include "views/layout_manager.h" #include "views/widget/widget.h" |