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

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

Issue 2900773004: media: Add experimental feature to enable Mojo CDM on desktop Chromium (Closed)
Patch Set: drop utility_process_host_impl.cc change Created 3 years, 6 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 unsandboxed_services.insert( 366 unsandboxed_services.insert(
367 std::make_pair(content::mojom::kNetworkServiceName, 367 std::make_pair(content::mojom::kNetworkServiceName,
368 base::ASCIIToUTF16("Network Service"))); 368 base::ASCIIToUTF16("Network Service")));
369 } 369 }
370 if (base::FeatureList::IsEnabled(video_capture::kMojoVideoCapture)) { 370 if (base::FeatureList::IsEnabled(video_capture::kMojoVideoCapture)) {
371 unsandboxed_services.insert( 371 unsandboxed_services.insert(
372 std::make_pair(video_capture::mojom::kServiceName, 372 std::make_pair(video_capture::mojom::kServiceName,
373 base::ASCIIToUTF16("Video Capture Service"))); 373 base::ASCIIToUTF16("Video Capture Service")));
374 } 374 }
375 375
376 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)
377 // TODO(xhwang): This is only used for test/experiment for now so it's okay
378 // to run it in an unsandboxed utility process. Fix CDM loading so that we can
379 // run it in the sandboxed utility process. See http://crbug.com/510604
380 // TODO(xhwang): Replace the service name "media" with a constant string.
381 unsandboxed_services.insert(
382 std::make_pair("media", base::ASCIIToUTF16("Media Service")));
383 #endif
384
376 for (const auto& service : unsandboxed_services) { 385 for (const auto& service : unsandboxed_services) {
377 packaged_services_connection_->AddServiceRequestHandler( 386 packaged_services_connection_->AddServiceRequestHandler(
378 service.first, base::Bind(&StartServiceInUtilityProcess, service.first, 387 service.first, base::Bind(&StartServiceInUtilityProcess, service.first,
379 service.second, false /* use_sandbox */)); 388 service.second, false /* use_sandbox */));
380 } 389 }
381 390
382 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS) 391 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
383 packaged_services_connection_->AddServiceRequestHandler( 392 packaged_services_connection_->AddServiceRequestHandler(
384 "media", base::Bind(&StartServiceInGpuProcess, "media")); 393 "media", base::Bind(&StartServiceInGpuProcess, "media"));
385 #endif 394 #endif
(...skipping 29 matching lines...) Expand all
415 base::Bind(&DestroyConnectorOnIOThread)); 424 base::Bind(&DestroyConnectorOnIOThread));
416 } 425 }
417 426
418 // static 427 // static
419 service_manager::Connector* ServiceManagerContext::GetConnectorForIOThread() { 428 service_manager::Connector* ServiceManagerContext::GetConnectorForIOThread() {
420 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 429 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
421 return g_io_thread_connector.Get().get(); 430 return g_io_thread_connector.Get().get();
422 } 431 }
423 432
424 } // namespace content 433 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/encrypted_media_browsertest.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698