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/app/core_services_initialization.h"
7 #include "mojo/package_manager/package_manager_impl.h"
8 #include "mojo/runner/context.h"
12 void InitCoreServicesForContext(mojo::runner::Context
* context
) {
13 // TODO(erg): We should probably handle this differently; these could be
14 // autogenerated from package manifests.
15 mojo::package_manager::PackageManagerImpl
* manager
=
16 context
->package_manager();
17 manager
->RegisterApplicationPackageAlias(
18 GURL("mojo:clipboard"), GURL("mojo:core_services"), "Core");
19 manager
->RegisterApplicationPackageAlias(GURL("mojo:filesystem"),
20 GURL("mojo:core_services"), "Files");
21 #if defined(OS_LINUX) && !defined(OS_ANDROID)
22 manager
->RegisterApplicationPackageAlias(GURL("mojo:font_service"),
23 GURL("mojo:core_services"), "Files");
25 #if !defined(OS_ANDROID)
26 // On Android, these are Java apps which are loaded in the shell process.
27 manager
->RegisterApplicationPackageAlias(GURL("mojo:mus"),
28 GURL("mojo:core_services"),
30 manager
->RegisterApplicationPackageAlias(
31 GURL("mojo:network_service"), GURL("mojo:core_services"), "Network");
32 manager
->RegisterApplicationPackageAlias(
33 GURL("mojo:resource_provider"), GURL("mojo:core_services"), "Files");
37 manager
->RegisterApplicationPackageAlias(GURL("mojo:desktop_ui"),
38 GURL("mojo:core_services"),
40 manager
->RegisterApplicationPackageAlias(
41 GURL("mojo:omnibox"), GURL("mojo:core_services"), "Core");
43 manager
->RegisterApplicationPackageAlias(
44 GURL("mojo:web_view"), GURL("mojo:core_services"), "Core");
45 manager
->RegisterApplicationPackageAlias(
46 GURL("mojo:tracing"), GURL("mojo:core_services"), "Core");
49 } // namespace mandoline