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

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

Issue 2027093002: mus: Initialize WindowManagerConnection in chrome instead of in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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_browser_main_extra_parts_views.cc
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
index ee236a424c0c99f7ed8d52cc09074840ac2285f6..1d45fb1dd6800381cb86a90e6a5c89d5ddb2f18a 100644
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
@@ -14,6 +14,11 @@
#include "ui/wm/core/wm_state.h"
#endif
+#if defined(USE_AURA) && defined(MOJO_SHELL_CLIENT)
+#include "content/public/common/mojo_shell_connection.h"
+#include "ui/views/mus/window_manager_connection.h"
+#endif
+
ChromeBrowserMainExtraPartsViews::ChromeBrowserMainExtraPartsViews() {
}
@@ -39,3 +44,15 @@ void ChromeBrowserMainExtraPartsViews::PreCreateThreads() {
display::Screen::SetScreenInstance(views::CreateDesktopScreen());
#endif
}
+
+void ChromeBrowserMainExtraPartsViews::PreProfileInit() {
+#if defined(USE_AURA) && defined(MOJO_SHELL_CLIENT)
+ content::MojoShellConnection* mojo_shell_connection =
+ content::MojoShellConnection::Get();
+ if (mojo_shell_connection && mojo_shell_connection->UsingExternalShell()) {
+ views::WindowManagerConnection::Create(
+ mojo_shell_connection->GetConnector(),
+ mojo_shell_connection->GetIdentity());
+ }
+#endif
+}

Powered by Google App Engine
This is Rietveld 408576698