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

Unified Diff: services/navigation/content_client/browser_main_parts.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
« no previous file with comments | « services/navigation/content_client/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/navigation/content_client/browser_main_parts.cc
diff --git a/services/navigation/content_client/browser_main_parts.cc b/services/navigation/content_client/browser_main_parts.cc
index 09a688b3c999058a00bfea49d2c5f9e1e34ea4bb..857d7e9579b1c0f76f352b0e1989376f32eea2aa 100644
--- a/services/navigation/content_client/browser_main_parts.cc
+++ b/services/navigation/content_client/browser_main_parts.cc
@@ -9,6 +9,7 @@
#include "content/shell/browser/shell_browser_context.h"
#include "content/shell/browser/shell_net_log.h"
#include "services/navigation/navigation.h"
+#include "ui/views/mus/window_manager_connection.h"
#include "ui/views/test/test_views_delegate.h"
namespace navigation {
@@ -23,11 +24,17 @@ void BrowserMainParts::ToolkitInitialized() {
}
void BrowserMainParts::PreMainMessageLoopRun() {
+ content::MojoShellConnection* mojo_shell_connection =
+ content::MojoShellConnection::Get();
+ if (mojo_shell_connection) {
+ views::WindowManagerConnection::Create(
+ mojo_shell_connection->GetConnector(),
+ mojo_shell_connection->GetIdentity());
+ }
net_log_.reset(new content::ShellNetLog("ash_shell"));
browser_context_.reset(
new content::ShellBrowserContext(false, net_log_.get()));
- navigation_->Init(content::MojoShellConnection::Get()->GetConnector(),
- browser_context());
+ navigation_->Init(mojo_shell_connection->GetConnector(), browser_context());
}
void BrowserMainParts::PostMainMessageLoopRun() {
« no previous file with comments | « services/navigation/content_client/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698