| Index: ui/gfx/screen_win.cc
|
| diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc
|
| index 23dbc9d60fbb865a6124b32d57690bbb41d21ba2..9bdf709d4dead4cfd40f6eea700eab203c485e57 100644
|
| --- a/ui/gfx/screen_win.cc
|
| +++ b/ui/gfx/screen_win.cc
|
| @@ -29,6 +29,20 @@ gfx::Display GetDisplay(MONITORINFO& monitor_info) {
|
| return display;
|
| }
|
|
|
| +BOOL CALLBACK EnumMonitorCallback(HMONITOR monitor,
|
| + HDC hdc,
|
| + LPRECT rect,
|
| + LPARAM data) {
|
| + std::vector<gfx::Display>* all_displays =
|
| + reinterpret_cast<std::vector<gfx::Display>*>(data);
|
| + DCHECK(all_displays);
|
| +
|
| + MONITORINFO monitor_info = GetMonitorInfoForMonitor(monitor);
|
| + gfx::Display display = GetDisplay(monitor_info);
|
| + all_displays->push_back(display);
|
| + return TRUE;
|
| +}
|
| +
|
| } // namespace
|
|
|
| namespace gfx {
|
| @@ -60,8 +74,10 @@ int ScreenWin::GetNumDisplays() const {
|
| }
|
|
|
| std::vector<gfx::Display> ScreenWin::GetAllDisplays() const {
|
| - NOTIMPLEMENTED();
|
| - return std::vector<gfx::Display>(1, GetPrimaryDisplay());
|
| + std::vector<gfx::Display> all_displays;
|
| + EnumDisplayMonitors(NULL, NULL, EnumMonitorCallback,
|
| + reinterpret_cast<LPARAM>(&all_displays));
|
| + return all_displays;
|
| }
|
|
|
| gfx::Display ScreenWin::GetDisplayNearestWindow(gfx::NativeView window) const {
|
|
|