Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Unified Diff: ui/views/widget/widget.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 361a39904a2b58b9cc1862fe805fc7e5802ccd1c..c4461cc41ecb69a092bcb061c5ce5511f9fb2805 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -63,7 +63,7 @@ NativeWidget* CreateNativeWidget(NativeWidget* native_widget,
}
if (!native_widget) {
native_widget =
- internal::NativeWidgetPrivate::CreateNativeWidget(delegate);
+ internal::NativeWidgetPrivate::CreateNativeWidget(delegate, parent);
}
}
return native_widget;
@@ -467,7 +467,8 @@ void Widget::CenterWindow(const gfx::Size& size) {
void Widget::SetBoundsConstrained(const gfx::Rect& bounds) {
gfx::Rect work_area =
- gfx::Screen::GetDisplayNearestPoint(bounds.origin()).work_area();
+ gfx::Screen::GetScreenFor(GetNativeView())->GetDisplayNearestPoint(
+ bounds.origin()).work_area();
if (work_area.IsEmpty()) {
SetBounds(bounds);
} else {
« ui/views/widget/tooltip_manager.h ('K') | « ui/views/widget/tooltip_manager_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698