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

Unified Diff: content/browser/child_process_launcher.cc

Issue 1452823003: Bind Application in renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/mojo/mojo_shell_client_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/child_process_launcher.cc
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index 830d5b9345a536d9207d0f5f075b8b4147ec5372..e54cada9326d13645a4890028f87a29d0ea846f4 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -48,17 +48,6 @@
#include "gin/v8_initializer.h"
#endif
-#if defined(MOJO_SHELL_CLIENT)
-#include "base/thread_task_runner_handle.h"
-#include "content/public/common/mojo_shell_connection.h"
-#include "mojo/application/public/cpp/application_impl.h"
-#include "mojo/converters/network/network_type_converters.h"
-#include "mojo/shell/application_manager.mojom.h"
-#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
-#include "third_party/mojo/src/mojo/edk/embedder/platform_channel_pair.h"
-#include "third_party/mojo/src/mojo/edk/embedder/scoped_platform_handle.h"
-#endif
-
namespace content {
namespace {
@@ -333,10 +322,6 @@ void SetProcessBackgroundedOnLauncherThread(base::Process process,
#endif
}
-#if defined(MOJO_SHELL_CLIENT)
-void DidCreateChannel(mojo::embedder::ChannelInfo* info) {}
-#endif
-
} // namespace
ChildProcessLauncher::ChildProcessLauncher(
@@ -380,10 +365,6 @@ void ChildProcessLauncher::Launch(
int child_process_id) {
DCHECK(CalledOnValidThread());
-#if defined(MOJO_SHELL_CLIENT)
- CreateMojoShellChannel(cmd_line, child_process_id);
-#endif
-
#if defined(OS_ANDROID)
// Android only supports renderer, sandboxed utility and gpu.
std::string process_type =
@@ -523,46 +504,6 @@ void ChildProcessLauncher::Notify(
}
}
-#if defined(MOJO_SHELL_CLIENT)
-void ChildProcessLauncher::CreateMojoShellChannel(
- base::CommandLine* command_line,
- int child_process_id) {
- // Some process types get created before the main message loop.
- if (!MojoShellConnection::Get())
- return;
-
- // Create the channel to be shared with the target process.
- mojo::embedder::HandlePassingInformation handle_passing_info;
- mojo::embedder::PlatformChannelPair platform_channel_pair;
-
- // Give one end to the shell so that it can create an instance.
- mojo::embedder::ScopedPlatformHandle platform_channel =
- platform_channel_pair.PassServerHandle();
- mojo::ScopedMessagePipeHandle handle(mojo::embedder::CreateChannel(
- platform_channel.Pass(), base::Bind(&DidCreateChannel),
- base::ThreadTaskRunnerHandle::Get()));
- mojo::shell::mojom::ApplicationManagerPtr application_manager;
- MojoShellConnection::Get()->GetApplication()->ConnectToService(
- mojo::URLRequest::From(std::string("mojo:shell")),
- &application_manager);
- // The content of the URL/qualifier we pass is actually meaningless, it's only
- // important that they're unique per process.
- // TODO(beng): We need to specify a restrictive CapabilityFilter here that
- // matches the needs of the target process. Figure out where that
- // specification is best determined (not here, this is a common
- // chokepoint for all process types) and how to wire it through.
- // http://crbug.com/555393
- application_manager->CreateInstanceForHandle(
- mojo::ScopedHandle(mojo::Handle(handle.release().value())),
- "exe:chrome_renderer", // See above about how this string is meaningless.
- base::IntToString(child_process_id));
-
- // Put the other end on the command line used to launch the target.
- platform_channel_pair.PrepareToPassClientHandleToChildProcess(
- command_line, &handle_passing_info);
-}
-#endif // defined(MOJO_SHELL_CLIENT)
-
bool ChildProcessLauncher::IsStarting() {
// TODO(crbug.com/469248): This fails in some tests.
// DCHECK(CalledOnValidThread());
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/mojo/mojo_shell_client_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698