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

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

Issue 2804373002: Eliminate Connector::Connect(), Connection, etc. (Closed)
Patch Set: . Created 3 years, 8 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 | « ash/mus/window_manager_unittest.cc ('k') | chrome/test/base/mash_browser_tests_main.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 <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 #if defined(OS_POSIX) 236 #if defined(OS_POSIX)
237 // Quit the main process in response to shutdown signals (like SIGTERM). 237 // Quit the main process in response to shutdown signals (like SIGTERM).
238 // These signals are used by Linux distributions to request clean shutdown. 238 // These signals are used by Linux distributions to request clean shutdown.
239 // On Chrome OS the SIGTERM signal is sent by session_manager. 239 // On Chrome OS the SIGTERM signal is sent by session_manager.
240 InstallShutdownSignalHandlers(run_loop.QuitClosure(), 240 InstallShutdownSignalHandlers(run_loop.QuitClosure(),
241 base::ThreadTaskRunnerHandle::Get()); 241 base::ThreadTaskRunnerHandle::Get());
242 #endif 242 #endif
243 243
244 // Ping services that we know we want to launch on startup (UI service, 244 // Ping services that we know we want to launch on startup (UI service,
245 // window manager, quick launch app). 245 // window manager, quick launch app).
246 context.connector()->Connect(ui::mojom::kServiceName); 246 context.connector()->StartService(ui::mojom::kServiceName);
247 context.connector()->Connect(content::mojom::kPackagedServicesServiceName); 247 context.connector()->StartService(
248 content::mojom::kPackagedServicesServiceName);
248 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kMash)) { 249 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kMash)) {
249 context.connector()->Connect(mash::common::GetWindowManagerServiceName()); 250 context.connector()->StartService(
250 context.connector()->Connect(mash::quick_launch::mojom::kServiceName); 251 mash::common::GetWindowManagerServiceName());
252 context.connector()->StartService(mash::quick_launch::mojom::kServiceName);
251 } 253 }
252 254
253 run_loop.Run(); 255 run_loop.Run();
254 256
255 // |context| must be destroyed before the message loop. 257 // |context| must be destroyed before the message loop.
256 return exit_value; 258 return exit_value;
257 } 259 }
258 260
259 int MashRunner::RunChild() { 261 int MashRunner::RunChild() {
260 service_manager::WaitForDebuggerIfNecessary(); 262 service_manager::WaitForDebuggerIfNecessary();
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 command_line->GetSwitchValueASCII(switches::kWaitForDebugger)) { 339 command_line->GetSwitchValueASCII(switches::kWaitForDebugger)) {
338 return; 340 return;
339 } 341 }
340 342
341 // Include the pid as logging may not have been initialized yet (the pid 343 // Include the pid as logging may not have been initialized yet (the pid
342 // printed out by logging is wrong). 344 // printed out by logging is wrong).
343 LOG(WARNING) << "waiting for debugger to attach for service " << service_name 345 LOG(WARNING) << "waiting for debugger to attach for service " << service_name
344 << " pid=" << base::Process::Current().Pid(); 346 << " pid=" << base::Process::Current().Pid();
345 base::debug::WaitForDebugger(120, true); 347 base::debug::WaitForDebugger(120, true);
346 } 348 }
OLDNEW
« no previous file with comments | « ash/mus/window_manager_unittest.cc ('k') | chrome/test/base/mash_browser_tests_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698