Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / mandoline / services / core_services / main.cc
blob91f81e5f5cb96325b5d8d4652d80da2b51f2db90
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
3 // found in the LICENSE file.
5 #include "mandoline/services/core_services/core_services_application_delegate.h"
6 #include "mojo/application/public/cpp/application_runner.h"
7 #include "third_party/mojo/src/mojo/public/c/system/main.h"
9 // TODO(erg): Much of this will be the same between mojo applications. Maybe we
10 // could centralize this code?
11 #if defined(OS_LINUX) && !defined(OS_ANDROID)
12 #include "base/rand_util.h"
13 #include "base/sys_info.h"
15 // TODO(erg): Much of this was coppied from zygote_main_linux.cc
16 extern "C" {
17 void __attribute__((visibility("default"))) MojoSandboxWarm() {
18 base::RandUint64();
19 base::SysInfo::AmountOfPhysicalMemory();
20 base::SysInfo::MaxSharedMemorySize();
21 base::SysInfo::NumberOfProcessors();
23 // TODO(erg): icu does timezone initialization here.
25 // TODO(erg): Perform OpenSSL warmup; it wants access to /dev/urandom.
27 // TODO(erg): Initialize SkFontConfigInterface; it has its own odd IPC system
28 // which probably must be ported to mojo.
31 #endif // defined(OS_LINUX) && !defined(OS_ANDROID)
33 MojoResult MojoMain(MojoHandle shell_handle) {
34 mojo::ApplicationRunner runner(
35 new core_services::CoreServicesApplicationDelegate);
36 return runner.Run(shell_handle);