Index: ui/views/widget/widget.cc |
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc |
index 18aa4c63c9fb10a44882de7a5305c83b28bd5c6e..0f1fd6a6d949e7da430aa2933ae344b05fe7bad0 100644 |
--- a/ui/views/widget/widget.cc |
+++ b/ui/views/widget/widget.cc |
@@ -532,9 +532,9 @@ void Widget::CenterWindow(const gfx::Size& size) { |
} |
void Widget::SetBoundsConstrained(const gfx::Rect& bounds) { |
- gfx::Rect work_area = |
- gfx::Screen::GetScreenFor(GetNativeView())->GetDisplayNearestPoint( |
- bounds.origin()).work_area(); |
+ gfx::Rect work_area = gfx::Screen::GetScreen() |
+ ->GetDisplayNearestPoint(bounds.origin()) |
+ .work_area(); |
if (work_area.IsEmpty()) { |
SetBounds(bounds); |
} else { |