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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1461243002: [OLD ATTEMPT, DO NOT REVIEW] mustash: Enable connections to mus from the Chrome renderer Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Ben's comments Created 5 years, 1 month 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: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 273f864216521154bca581126385875967bd4a02..2b4349f21315b2c924a24c5c2d0f6b63362202a1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -134,6 +134,7 @@
#endif
#if defined(MOJO_SHELL_CLIENT)
+#include "content/browser/mus_util.h"
#include "content/browser/web_contents/web_contents_view_mus.h"
#include "content/public/common/mojo_shell_connection.h"
#endif
@@ -534,6 +535,7 @@ WebContentsImpl* WebContentsImpl::CreateWithOpener(
// bit to true.
new_contents->is_subframe_ = true;
}
+
new_contents->Init(params);
return new_contents;
}
@@ -1379,8 +1381,11 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
if (MojoShellConnection::Get() &&
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kUseMusInRenderer)) {
- view_.reset(new WebContentsViewMus(this, view_.Pass(),
- &render_view_host_delegate_view_));
+ mus::Window* window = GetMusWindow(params.context);
+ if (window) {
+ view_.reset(new WebContentsViewMus(this, window, view_.Pass(),
+ &render_view_host_delegate_view_));
+ }
}
#endif
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_view_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698