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

Side by Side Diff: chrome/app/mash/mash_runner.cc

Issue 1793793002: Remove ShellConnection::WaitForInitialize (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 | « no previous file | components/mus/ws/window_tree_client_unittest.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/app/mash/mash_runner.h" 5 #include "chrome/app/mash/mash_runner.h"
6 6
7 #include "ash/mus/sysui_application.h" 7 #include "ash/mus/sysui_application.h"
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 NativeRunnerDelegateImpl native_runner_delegate; 179 NativeRunnerDelegateImpl native_runner_delegate;
180 mojo::shell::BackgroundShell background_shell; 180 mojo::shell::BackgroundShell background_shell;
181 scoped_ptr<mojo::shell::BackgroundShell::InitParams> init_params( 181 scoped_ptr<mojo::shell::BackgroundShell::InitParams> init_params(
182 new mojo::shell::BackgroundShell::InitParams); 182 new mojo::shell::BackgroundShell::InitParams);
183 init_params->native_runner_delegate = &native_runner_delegate; 183 init_params->native_runner_delegate = &native_runner_delegate;
184 background_shell.Init(std::move(init_params)); 184 background_shell.Init(std::move(init_params));
185 shell_client_.reset(new DefaultShellClient); 185 shell_client_.reset(new DefaultShellClient);
186 shell_connection_.reset(new mojo::ShellConnection( 186 shell_connection_.reset(new mojo::ShellConnection(
187 shell_client_.get(), 187 shell_client_.get(),
188 background_shell.CreateShellClientRequest("exe:chrome_mash"))); 188 background_shell.CreateShellClientRequest("exe:chrome_mash")));
189 shell_connection_->WaitForInitialize();
190 shell_connection_->connector()->Connect("mojo:mash_shell"); 189 shell_connection_->connector()->Connect("mojo:mash_shell");
191 base::MessageLoop::current()->Run(); 190 base::MessageLoop::current()->Run();
192 } 191 }
193 192
194 void MashRunner::RunChild() { 193 void MashRunner::RunChild() {
195 base::i18n::InitializeICU(); 194 base::i18n::InitializeICU();
196 mojo::shell::ChildProcessMain( 195 mojo::shell::ChildProcessMain(
197 base::Bind(&MashRunner::StartChildApp, base::Unretained(this))); 196 base::Bind(&MashRunner::StartChildApp, base::Unretained(this)));
198 } 197 }
199 198
(...skipping 25 matching lines...) Expand all
225 scoped_ptr<base::MessageLoop> message_loop; 224 scoped_ptr<base::MessageLoop> message_loop;
226 #if defined(OS_LINUX) 225 #if defined(OS_LINUX)
227 base::AtExitManager exit_manager; 226 base::AtExitManager exit_manager;
228 #endif 227 #endif
229 if (!IsChild()) 228 if (!IsChild())
230 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); 229 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI));
231 MashRunner mash_runner; 230 MashRunner mash_runner;
232 mash_runner.Run(); 231 mash_runner.Run();
233 return 0; 232 return 0;
234 } 233 }
OLDNEW
« no previous file with comments | « no previous file | components/mus/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698