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

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: rejigger 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
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f7dc790d556072aa6277b2bfed99720e2123fd00..463522326a832613fa46e709777e75aa85c0a0cd 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -34,6 +34,7 @@
#endif
#if defined(USE_AURA)
+#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#endif
@@ -337,7 +338,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.
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698