Index: ui/gfx/screen_win.cc |
diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc |
index 9210971d7b45d63865c6de2dd1dc0f2a9c75d7e1..f19117b80f8ffa9c2105880f5b21a1a2b2da3879 100644 |
--- a/ui/gfx/screen_win.cc |
+++ b/ui/gfx/screen_win.cc |
@@ -6,6 +6,8 @@ |
#include <windows.h> |
+#include "base/bind.h" |
+#include "base/bind_helpers.h" |
#include "base/hash.h" |
#include "base/logging.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -85,13 +87,11 @@ std::vector<gfx::Display> GetDisplays() { |
namespace gfx { |
ScreenWin::ScreenWin() |
- : displays_(GetDisplays()) { |
- SingletonHwnd::GetInstance()->AddObserver(this); |
-} |
+ : displays_(GetDisplays()), |
+ singleton_hwnd_observer_(new SingletonHwndObserver( |
+ base::Bind(&ScreenWin::OnWndProc, base::Unretained(this)))) {} |
-ScreenWin::~ScreenWin() { |
- SingletonHwnd::GetInstance()->RemoveObserver(this); |
-} |
+ScreenWin::~ScreenWin() {} |
gfx::Point ScreenWin::GetCursorScreenPoint() { |
POINT pt; |