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

Unified Diff: ui/views/mus/window_manager_connection.cc

Issue 2018333002: views/mus: Add support for child widgets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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 | « ui/views/mus/BUILD.gn ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/window_manager_connection.cc
diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc
index 9924b2d56fed2024a57e2a4fb4968fc21991a6ca..ff6260fd02b4506e4196a5bf9f3fe858f0087292 100644
--- a/ui/views/mus/window_manager_connection.cc
+++ b/ui/views/mus/window_manager_connection.cc
@@ -68,6 +68,11 @@ NativeWidget* WindowManagerConnection::CreateNativeWidgetMus(
const std::map<std::string, std::vector<uint8_t>>& props,
const Widget::InitParams& init_params,
internal::NativeWidgetDelegate* delegate) {
+ // TYPE_CONTROL widgets require a NativeWidgetAura. So we let this fall
+ // through, so that the default NativeWidgetPrivate::CreateNativeWidget() is
+ // used instead.
+ if (init_params.type == Widget::InitParams::TYPE_CONTROL)
+ return nullptr;
std::map<std::string, std::vector<uint8_t>> properties = props;
NativeWidgetMus::ConfigurePropertiesForNewWindow(init_params, &properties);
properties[mus::mojom::WindowManager::kAppID_Property] =
« no previous file with comments | « ui/views/mus/BUILD.gn ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698