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

Unified Diff: ui/views/widget/native_widget_aura.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: tidy 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/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index ecd71bc51e0ca82106c4281610060a9727e39516..53f0506676b51e2924c71cf569c45df4058b7b63 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -128,11 +128,12 @@ class NativeWidgetAura::ActiveWindowObserver
////////////////////////////////////////////////////////////////////////////////
// NativeWidgetAura, public:
-NativeWidgetAura::NativeWidgetAura(internal::NativeWidgetDelegate* delegate)
+NativeWidgetAura::NativeWidgetAura(
+ internal::NativeWidgetDelegate* delegate, gfx::NativeView parent)
: delegate_(delegate),
ALLOW_THIS_IN_INITIALIZER_LIST(desktop_helper_(
ViewsDelegate::views_delegate ?
- ViewsDelegate::views_delegate->CreateNativeWidgetHelper(this) :
+ ViewsDelegate::views_delegate->CreateNativeWidgetHelper(this, parent):
NULL)),
ALLOW_THIS_IN_INITIALIZER_LIST(window_(new aura::Window(this))),
ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET),
@@ -461,7 +462,8 @@ void NativeWidgetAura::SetBounds(const gfx::Rect& bounds) {
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(root);
if (screen_position_client) {
- gfx::Display dst_display = gfx::Screen::GetDisplayMatching(bounds);
+ gfx::Display dst_display = gfx::Screen::GetDisplayMatching(
+ window_, bounds);
screen_position_client->SetBounds(window_, bounds, dst_display);
return;
}
@@ -982,8 +984,9 @@ namespace internal {
// static
NativeWidgetPrivate* NativeWidgetPrivate::CreateNativeWidget(
- internal::NativeWidgetDelegate* delegate) {
- return new NativeWidgetAura(delegate);
+ internal::NativeWidgetDelegate* delegate,
+ gfx::NativeView parent) {
+ return new NativeWidgetAura(delegate, parent);
}
// static

Powered by Google App Engine
This is Rietveld 408576698