summaryrefslogtreecommitdiffstats
path: root/mandoline/app/register_local_aliases.cc
blob: f71abfa3d5cd4484e43391f934018b2cefdb52b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "mojo/runner/register_local_aliases.h"

#include "mojo/package_manager/package_manager_impl.h"

namespace mojo {
namespace runner {

void RegisterLocalAliases(mojo::package_manager::PackageManagerImpl* manager) {
  // TODO(erg): We should probably handle this differently; these could be
  // autogenerated from package manifests.
  manager->RegisterApplicationPackageAlias(
      GURL("mojo:clipboard"), GURL("mojo:core_services"), "Core");
  manager->RegisterApplicationPackageAlias(GURL("mojo:filesystem"),
                                           GURL("mojo:core_services"), "Files");
#if defined(OS_LINUX) && !defined(OS_ANDROID)
  manager->RegisterApplicationPackageAlias(GURL("mojo:font_service"),
                                           GURL("mojo:core_services"), "Files");
#endif
#if !defined(OS_ANDROID)
  // On Android, these are Java apps which are loaded in the shell process.
  manager->RegisterApplicationPackageAlias(GURL("mojo:mus"),
                                           GURL("mojo:core_services"),
                                           "Surfaces");
  manager->RegisterApplicationPackageAlias(
      GURL("mojo:network_service"), GURL("mojo:core_services"), "Network");
  manager->RegisterApplicationPackageAlias(
      GURL("mojo:resource_provider"), GURL("mojo:core_services"), "Files");
#endif

#if defined(USE_AURA)
  manager->RegisterApplicationPackageAlias(GURL("mojo:desktop_ui"),
                                           GURL("mojo:core_services"),
                                           "Core");
  manager->RegisterApplicationPackageAlias(
      GURL("mojo:omnibox"), GURL("mojo:core_services"), "Core");
#endif
  manager->RegisterApplicationPackageAlias(
      GURL("mojo:web_view"), GURL("mojo:core_services"), "Core");
  manager->RegisterApplicationPackageAlias(
      GURL("mojo:tracing"), GURL("mojo:core_services"), "Core");
}

}  // namespace runner
}  // namespace mojo