| 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 "content/browser/service_manager/service_manager_context.h" | 5 #include "content/browser/service_manager/service_manager_context.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "content/public/browser/utility_process_host.h" | 23 #include "content/public/browser/utility_process_host.h" |
| 24 #include "content/public/browser/utility_process_host_client.h" | 24 #include "content/public/browser/utility_process_host_client.h" |
| 25 #include "content/public/common/content_client.h" | 25 #include "content/public/common/content_client.h" |
| 26 #include "content/public/common/service_manager_connection.h" | 26 #include "content/public/common/service_manager_connection.h" |
| 27 #include "content/public/common/service_names.mojom.h" | 27 #include "content/public/common/service_names.mojom.h" |
| 28 #include "mojo/edk/embedder/embedder.h" | 28 #include "mojo/edk/embedder/embedder.h" |
| 29 #include "services/catalog/catalog.h" | 29 #include "services/catalog/catalog.h" |
| 30 #include "services/catalog/manifest_provider.h" | 30 #include "services/catalog/manifest_provider.h" |
| 31 #include "services/catalog/public/interfaces/constants.mojom.h" | 31 #include "services/catalog/public/interfaces/constants.mojom.h" |
| 32 #include "services/catalog/store.h" | 32 #include "services/catalog/store.h" |
| 33 #include "services/file/public/interfaces/constants.mojom.h" | |
| 34 #include "services/service_manager/connect_params.h" | 33 #include "services/service_manager/connect_params.h" |
| 35 #include "services/service_manager/public/cpp/connector.h" | 34 #include "services/service_manager/public/cpp/connector.h" |
| 36 #include "services/service_manager/public/cpp/service.h" | 35 #include "services/service_manager/public/cpp/service.h" |
| 37 #include "services/service_manager/public/interfaces/service.mojom.h" | 36 #include "services/service_manager/public/interfaces/service.mojom.h" |
| 38 #include "services/service_manager/runner/common/client_util.h" | 37 #include "services/service_manager/runner/common/client_util.h" |
| 39 #include "services/service_manager/service_manager.h" | 38 #include "services/service_manager/service_manager.h" |
| 40 | 39 |
| 41 namespace content { | 40 namespace content { |
| 42 | 41 |
| 43 namespace { | 42 namespace { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 static const struct ManifestInfo { | 247 static const struct ManifestInfo { |
| 249 const char* name; | 248 const char* name; |
| 250 int resource_id; | 249 int resource_id; |
| 251 } kManifests[] = { | 250 } kManifests[] = { |
| 252 { mojom::kBrowserServiceName, IDR_MOJO_CONTENT_BROWSER_MANIFEST }, | 251 { mojom::kBrowserServiceName, IDR_MOJO_CONTENT_BROWSER_MANIFEST }, |
| 253 { mojom::kGpuServiceName, IDR_MOJO_CONTENT_GPU_MANIFEST }, | 252 { mojom::kGpuServiceName, IDR_MOJO_CONTENT_GPU_MANIFEST }, |
| 254 { mojom::kPluginServiceName, IDR_MOJO_CONTENT_PLUGIN_MANIFEST }, | 253 { mojom::kPluginServiceName, IDR_MOJO_CONTENT_PLUGIN_MANIFEST }, |
| 255 { mojom::kRendererServiceName, IDR_MOJO_CONTENT_RENDERER_MANIFEST }, | 254 { mojom::kRendererServiceName, IDR_MOJO_CONTENT_RENDERER_MANIFEST }, |
| 256 { mojom::kUtilityServiceName, IDR_MOJO_CONTENT_UTILITY_MANIFEST }, | 255 { mojom::kUtilityServiceName, IDR_MOJO_CONTENT_UTILITY_MANIFEST }, |
| 257 { catalog::mojom::kServiceName, IDR_MOJO_CATALOG_MANIFEST }, | 256 { catalog::mojom::kServiceName, IDR_MOJO_CATALOG_MANIFEST }, |
| 258 { file::mojom::kServiceName, IDR_MOJO_FILE_MANIFEST } | |
| 259 }; | 257 }; |
| 260 | 258 |
| 261 for (size_t i = 0; i < arraysize(kManifests); ++i) { | 259 for (size_t i = 0; i < arraysize(kManifests); ++i) { |
| 262 manifest_provider->AddServiceManifest(kManifests[i].name, | 260 manifest_provider->AddServiceManifest(kManifests[i].name, |
| 263 kManifests[i].resource_id); | 261 kManifests[i].resource_id); |
| 264 } | 262 } |
| 265 for (const auto& manifest : | 263 for (const auto& manifest : |
| 266 GetContentClient()->browser()->GetExtraServiceManifests()) { | 264 GetContentClient()->browser()->GetExtraServiceManifests()) { |
| 267 manifest_provider->AddServiceManifest(manifest.name, | 265 manifest_provider->AddServiceManifest(manifest.name, |
| 268 manifest.resource_id); | 266 manifest.resource_id); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 base::Bind(&DestroyConnectorOnIOThread)); | 328 base::Bind(&DestroyConnectorOnIOThread)); |
| 331 } | 329 } |
| 332 | 330 |
| 333 // static | 331 // static |
| 334 service_manager::Connector* ServiceManagerContext::GetConnectorForIOThread() { | 332 service_manager::Connector* ServiceManagerContext::GetConnectorForIOThread() { |
| 335 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 333 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 336 return g_io_thread_connector.Get().get(); | 334 return g_io_thread_connector.Get().get(); |
| 337 } | 335 } |
| 338 | 336 |
| 339 } // namespace content | 337 } // namespace content |
| OLD | NEW |