OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 "mandoline/app/core_services_initialization.h" | 5 #include "mandoline/app/core_services_initialization.h" |
6 | 6 |
7 #include "mojo/package_manager/package_manager_impl.h" | |
8 #include "mojo/runner/context.h" | 7 #include "mojo/runner/context.h" |
9 | 8 |
10 namespace mandoline { | 9 namespace mandoline { |
11 | 10 |
12 void InitCoreServicesForContext(mojo::runner::Context* context) { | 11 void InitCoreServicesForContext(mojo::runner::Context* context) { |
13 // TODO(erg): We should probably handle this differently; these could be | 12 // TODO(erg): We should probably handle this differently; these could be |
14 // autogenerated from package manifests. | 13 // autogenerated from package manifests. |
15 mojo::package_manager::PackageManagerImpl* manager = | 14 mojo::shell::ApplicationManager* manager = context->application_manager(); |
16 context->package_manager(); | |
17 manager->RegisterApplicationPackageAlias( | 15 manager->RegisterApplicationPackageAlias( |
18 GURL("mojo:clipboard"), GURL("mojo:core_services"), "Core"); | 16 GURL("mojo:clipboard"), GURL("mojo:core_services"), "Core"); |
19 manager->RegisterApplicationPackageAlias(GURL("mojo:filesystem"), | 17 manager->RegisterApplicationPackageAlias(GURL("mojo:filesystem"), |
20 GURL("mojo:core_services"), "Files"); | 18 GURL("mojo:core_services"), "Files"); |
21 #if defined(OS_LINUX) && !defined(OS_ANDROID) | 19 #if defined(OS_LINUX) && !defined(OS_ANDROID) |
22 manager->RegisterApplicationPackageAlias(GURL("mojo:font_service"), | 20 manager->RegisterApplicationPackageAlias(GURL("mojo:font_service"), |
23 GURL("mojo:core_services"), "Files"); | 21 GURL("mojo:core_services"), "Files"); |
24 #endif | 22 #endif |
25 #if !defined(OS_ANDROID) | 23 #if !defined(OS_ANDROID) |
26 // On Android, these are Java apps which are loaded in the shell process. | 24 // On Android, these are Java apps which are loaded in the shell process. |
(...skipping 13 matching lines...) Expand all Loading... |
40 manager->RegisterApplicationPackageAlias( | 38 manager->RegisterApplicationPackageAlias( |
41 GURL("mojo:omnibox"), GURL("mojo:core_services"), "Core"); | 39 GURL("mojo:omnibox"), GURL("mojo:core_services"), "Core"); |
42 #endif | 40 #endif |
43 manager->RegisterApplicationPackageAlias( | 41 manager->RegisterApplicationPackageAlias( |
44 GURL("mojo:web_view"), GURL("mojo:core_services"), "Core"); | 42 GURL("mojo:web_view"), GURL("mojo:core_services"), "Core"); |
45 manager->RegisterApplicationPackageAlias( | 43 manager->RegisterApplicationPackageAlias( |
46 GURL("mojo:tracing"), GURL("mojo:core_services"), "Core"); | 44 GURL("mojo:tracing"), GURL("mojo:core_services"), "Core"); |
47 } | 45 } |
48 | 46 |
49 } // namespace mandoline | 47 } // namespace mandoline |
OLD | NEW |