| Index: chrome/browser/ui/views/chrome_views_delegate.cc
|
| diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
|
| index e434add1867f2cc37e32f8eff13c226fa80b3f56..5b08586da12879239ec453b8c106b5aaf19ee71d 100644
|
| --- a/chrome/browser/ui/views/chrome_views_delegate.cc
|
| +++ b/chrome/browser/ui/views/chrome_views_delegate.cc
|
| @@ -30,6 +30,7 @@
|
| #endif
|
|
|
| #if defined(USE_AURA)
|
| +#include "ui/aura/window.h"
|
| #include "ui/aura/window_event_dispatcher.h"
|
| #endif
|
|
|
| @@ -287,7 +288,15 @@ void ChromeViewsDelegate::OnBeforeWidgetInit(
|
| NOTREACHED();
|
| }
|
| } else if (use_non_toplevel_window) {
|
| - params->native_widget = new views::NativeWidgetAura(delegate);
|
| + views::NativeWidgetAura* native_widget =
|
| + new views::NativeWidgetAura(delegate);
|
| + if (params->parent) {
|
| + Profile* parent_profile = reinterpret_cast<Profile*>(
|
| + params->parent->GetNativeWindowProperty(Profile::kProfileKey));
|
| + native_widget->SetNativeWindowProperty(Profile::kProfileKey,
|
| + parent_profile);
|
| + }
|
| + params->native_widget = native_widget;
|
| } else if (params->type != views::Widget::InitParams::TYPE_TOOLTIP) {
|
| // TODO(erg): Once we've threaded context to everywhere that needs it, we
|
| // should remove this check here.
|
|
|