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() { |