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

Side by Side Diff: content/common/mojo/mojo_shell_connection_impl.cc

Issue 1748973003: Revert of Bootstrap Mojo IPC independent of Chrome IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « content/common/mojo/mojo_messages.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/mojo/mojo_shell_connection_impl.h" 5 #include "content/common/mojo/mojo_shell_connection_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 MojoShellConnectionImpl::~MojoShellConnectionImpl() { 78 MojoShellConnectionImpl::~MojoShellConnectionImpl() {
79 STLDeleteElements(&listeners_); 79 STLDeleteElements(&listeners_);
80 } 80 }
81 81
82 void MojoShellConnectionImpl::WaitForShell( 82 void MojoShellConnectionImpl::WaitForShell(
83 mojo::ScopedMessagePipeHandle handle) { 83 mojo::ScopedMessagePipeHandle handle) {
84 mojo::shell::mojom::ShellClientRequest request; 84 mojo::shell::mojom::ShellClientRequest request;
85 runner_connection_.reset(mojo::shell::RunnerConnection::ConnectToRunner( 85 runner_connection_.reset(mojo::shell::RunnerConnection::ConnectToRunner(
86 &request, std::move(handle), false /* exit_on_error */)); 86 &request, std::move(handle), false /* exit_on_error */));
87 if (!runner_connection_) { 87 if (!runner_connection_) {
88 DLOG(ERROR) << "Unable to connect to the Mojo shell.";
89 delete this; 88 delete this;
90 lazy_tls_ptr.Pointer()->Set(nullptr); 89 lazy_tls_ptr.Pointer()->Set(nullptr);
91 return; 90 return;
92 } 91 }
93 shell_connection_.reset(new mojo::ShellConnection(this, std::move(request))); 92 shell_connection_.reset(new mojo::ShellConnection(this, std::move(request)));
94 shell_connection_->WaitForInitialize(); 93 shell_connection_->WaitForInitialize();
95 } 94 }
96 95
97 void MojoShellConnectionImpl::Initialize(mojo::Connector* connector, 96 void MojoShellConnectionImpl::Initialize(mojo::Connector* connector,
98 const std::string& url, 97 const std::string& url,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // static 136 // static
138 void MojoShellConnection::Destroy() { 137 void MojoShellConnection::Destroy() {
139 // This joins the shell controller thread. 138 // This joins the shell controller thread.
140 delete Get(); 139 delete Get();
141 lazy_tls_ptr.Pointer()->Set(nullptr); 140 lazy_tls_ptr.Pointer()->Set(nullptr);
142 } 141 }
143 142
144 MojoShellConnection::~MojoShellConnection() {} 143 MojoShellConnection::~MojoShellConnection() {}
145 144
146 } // namespace content 145 } // namespace content
OLDNEW
« no previous file with comments | « content/common/mojo/mojo_messages.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698