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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 243633003: use the right NativeTheme on bubbles + dialogs on Aura Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: good enough for now Created 6 years, 8 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: 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.

Powered by Google App Engine
This is Rietveld 408576698