Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: content/browser/service_manager/service_manager_context.cc

Issue 2882813002: media: Convert mojo media defines to buildflags (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 16 matching lines...) Expand all
27 #include "content/grit/content_resources.h" 27 #include "content/grit/content_resources.h"
28 #include "content/public/browser/browser_thread.h" 28 #include "content/public/browser/browser_thread.h"
29 #include "content/public/browser/content_browser_client.h" 29 #include "content/public/browser/content_browser_client.h"
30 #include "content/public/browser/gpu_service_registry.h" 30 #include "content/public/browser/gpu_service_registry.h"
31 #include "content/public/browser/utility_process_host.h" 31 #include "content/public/browser/utility_process_host.h"
32 #include "content/public/browser/utility_process_host_client.h" 32 #include "content/public/browser/utility_process_host_client.h"
33 #include "content/public/common/content_client.h" 33 #include "content/public/common/content_client.h"
34 #include "content/public/common/content_switches.h" 34 #include "content/public/common/content_switches.h"
35 #include "content/public/common/service_manager_connection.h" 35 #include "content/public/common/service_manager_connection.h"
36 #include "content/public/common/service_names.mojom.h" 36 #include "content/public/common/service_names.mojom.h"
37 #include "media/mojo/features.h"
37 #include "mojo/edk/embedder/embedder.h" 38 #include "mojo/edk/embedder/embedder.h"
38 #include "mojo/edk/embedder/incoming_broker_client_invitation.h" 39 #include "mojo/edk/embedder/incoming_broker_client_invitation.h"
39 #include "services/catalog/manifest_provider.h" 40 #include "services/catalog/manifest_provider.h"
40 #include "services/catalog/public/cpp/manifest_parsing_util.h" 41 #include "services/catalog/public/cpp/manifest_parsing_util.h"
41 #include "services/catalog/public/interfaces/constants.mojom.h" 42 #include "services/catalog/public/interfaces/constants.mojom.h"
42 #include "services/data_decoder/public/interfaces/constants.mojom.h" 43 #include "services/data_decoder/public/interfaces/constants.mojom.h"
43 #include "services/device/device_service.h" 44 #include "services/device/device_service.h"
44 #include "services/device/public/interfaces/constants.mojom.h" 45 #include "services/device/public/interfaces/constants.mojom.h"
45 #include "services/resource_coordinator/public/cpp/resource_coordinator_features .h" 46 #include "services/resource_coordinator/public/cpp/resource_coordinator_features .h"
46 #include "services/resource_coordinator/public/interfaces/service_constants.mojo m.h" 47 #include "services/resource_coordinator/public/interfaces/service_constants.mojo m.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 std::make_pair(video_capture::mojom::kServiceName, 372 std::make_pair(video_capture::mojom::kServiceName,
372 base::ASCIIToUTF16("Video Capture Service"))); 373 base::ASCIIToUTF16("Video Capture Service")));
373 } 374 }
374 375
375 for (const auto& service : unsandboxed_services) { 376 for (const auto& service : unsandboxed_services) {
376 packaged_services_connection_->AddServiceRequestHandler( 377 packaged_services_connection_->AddServiceRequestHandler(
377 service.first, base::Bind(&StartServiceInUtilityProcess, service.first, 378 service.first, base::Bind(&StartServiceInUtilityProcess, service.first,
378 service.second, false /* use_sandbox */)); 379 service.second, false /* use_sandbox */));
379 } 380 }
380 381
381 #if (ENABLE_MOJO_MEDIA_IN_GPU_PROCESS) 382 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
382 packaged_services_connection_->AddServiceRequestHandler( 383 packaged_services_connection_->AddServiceRequestHandler(
383 "media", base::Bind(&StartServiceInGpuProcess, "media")); 384 "media", base::Bind(&StartServiceInGpuProcess, "media"));
384 #endif 385 #endif
385 386
386 packaged_services_connection_->AddServiceRequestHandler( 387 packaged_services_connection_->AddServiceRequestHandler(
387 shape_detection::mojom::kServiceName, 388 shape_detection::mojom::kServiceName,
388 base::Bind(&StartServiceInGpuProcess, 389 base::Bind(&StartServiceInGpuProcess,
389 shape_detection::mojom::kServiceName)); 390 shape_detection::mojom::kServiceName));
390 391
391 packaged_services_connection_->Start(); 392 packaged_services_connection_->Start();
(...skipping 22 matching lines...) Expand all
414 base::Bind(&DestroyConnectorOnIOThread)); 415 base::Bind(&DestroyConnectorOnIOThread));
415 } 416 }
416 417
417 // static 418 // static
418 service_manager::Connector* ServiceManagerContext::GetConnectorForIOThread() { 419 service_manager::Connector* ServiceManagerContext::GetConnectorForIOThread() {
419 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 420 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
420 return g_io_thread_connector.Get().get(); 421 return g_io_thread_connector.Get().get();
421 } 422 }
422 423
423 } // namespace content 424 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698