| 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/runner/context.h" | 7 #include "mojo/runner/context.h" |
| 8 | 8 |
| 9 namespace mandoline { | 9 namespace mandoline { |
| 10 | 10 |
| 11 void InitCoreServicesForContext(mojo::runner::Context* context) { | 11 void InitCoreServicesForContext(mojo::runner::Context* context) { |
| 12 // TODO(erg): We should probably handle this differently; these could be | 12 // TODO(erg): We should probably handle this differently; these could be |
| 13 // autogenerated from package manifests. | 13 // autogenerated from package manifests. |
| 14 mojo::shell::ApplicationManager* manager = context->application_manager(); | 14 mojo::shell::ApplicationManager* manager = context->application_manager(); |
| 15 manager->RegisterApplicationPackageAlias(GURL("mojo:clipboard"), | 15 manager->RegisterApplicationPackageAlias(GURL("mojo:clipboard"), |
| 16 GURL("mojo:core_services"), "Core"); | 16 GURL("mojo:core_services"), "Core"); |
| 17 #if !defined(OS_ANDROID) |
| 18 manager->RegisterApplicationPackageAlias(GURL("mojo:native_viewport_service"), |
| 19 GURL("mojo:core_services"), |
| 20 "Surfaces"); |
| 21 #endif |
| 17 manager->RegisterApplicationPackageAlias( | 22 manager->RegisterApplicationPackageAlias( |
| 18 GURL("mojo:network_service"), GURL("mojo:core_services"), "Network"); | 23 GURL("mojo:network_service"), GURL("mojo:core_services"), "Network"); |
| 19 #if !defined(OS_ANDROID) | 24 #if !defined(OS_ANDROID) |
| 20 manager->RegisterApplicationPackageAlias( | 25 manager->RegisterApplicationPackageAlias( |
| 21 GURL("mojo:omnibox"), GURL("mojo:core_services"), "Core"); | 26 GURL("mojo:omnibox"), GURL("mojo:core_services"), "Core"); |
| 22 #endif | 27 #endif |
| 23 manager->RegisterApplicationPackageAlias( | 28 manager->RegisterApplicationPackageAlias( |
| 24 GURL("mojo:resource_provider"), GURL("mojo:core_services"), "Core"); | 29 GURL("mojo:resource_provider"), GURL("mojo:core_services"), "Core"); |
| 25 manager->RegisterApplicationPackageAlias( | 30 manager->RegisterApplicationPackageAlias( |
| 26 GURL("mojo:surfaces_service"), GURL("mojo:core_services"), "Surfaces"); | 31 GURL("mojo:surfaces_service"), GURL("mojo:core_services"), "Surfaces"); |
| 27 manager->RegisterApplicationPackageAlias(GURL("mojo:tracing"), | 32 manager->RegisterApplicationPackageAlias(GURL("mojo:tracing"), |
| 28 GURL("mojo:core_services"), "Core"); | 33 GURL("mojo:core_services"), "Core"); |
| 29 manager->RegisterApplicationPackageAlias(GURL("mojo:view_manager"), | 34 manager->RegisterApplicationPackageAlias(GURL("mojo:view_manager"), |
| 30 GURL("mojo:core_services"), "Core"); | 35 GURL("mojo:core_services"), "Core"); |
| 31 manager->RegisterApplicationPackageAlias(GURL("mojo:window_manager"), | 36 manager->RegisterApplicationPackageAlias(GURL("mojo:window_manager"), |
| 32 GURL("mojo:core_services"), "Core"); | 37 GURL("mojo:core_services"), "Core"); |
| 33 } | 38 } |
| 34 | 39 |
| 35 } // namespace mandoline | 40 } // namespace mandoline |
| OLD | NEW |