OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/cast_content_browser_client.h" | 5 #include "chromecast/browser/cast_content_browser_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 | 417 |
418 void CastContentBrowserClient::ExposeInterfacesToRenderer( | 418 void CastContentBrowserClient::ExposeInterfacesToRenderer( |
419 ::shell::InterfaceRegistry* registry, | 419 ::shell::InterfaceRegistry* registry, |
420 content::RenderProcessHost* render_process_host) { | 420 content::RenderProcessHost* render_process_host) { |
421 registry->AddInterface( | 421 registry->AddInterface( |
422 base::Bind(&media::MediaCapsImpl::AddBinding, | 422 base::Bind(&media::MediaCapsImpl::AddBinding, |
423 base::Unretained(cast_browser_main_parts_->media_caps())), | 423 base::Unretained(cast_browser_main_parts_->media_caps())), |
424 base::ThreadTaskRunnerHandle::Get()); | 424 base::ThreadTaskRunnerHandle::Get()); |
425 } | 425 } |
426 | 426 |
427 void CastContentBrowserClient::RegisterInProcessMojoApplications( | 427 void CastContentBrowserClient::RegisterInProcessServices( |
428 StaticMojoApplicationMap* apps) { | 428 StaticServiceMap* services) { |
429 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 429 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
430 content::MojoApplicationInfo app_info; | 430 content::ServiceInfo info; |
431 app_info.application_factory = | 431 info.factory = |
432 base::Bind(&CreateMojoMediaApplication, base::Unretained(this)); | 432 base::Bind(&CreateMojoMediaApplication, base::Unretained(this)); |
433 app_info.application_task_runner = GetMediaTaskRunner(); | 433 info.task_runner = GetMediaTaskRunner(); |
434 apps->insert(std::make_pair("service:media", app_info)); | 434 services->insert(std::make_pair("service:media", info)); |
435 #endif | 435 #endif |
436 } | 436 } |
437 | 437 |
438 std::unique_ptr<base::Value> | 438 std::unique_ptr<base::Value> |
439 CastContentBrowserClient::GetServiceManifestOverlay( | 439 CastContentBrowserClient::GetServiceManifestOverlay( |
440 const std::string& service_name) { | 440 const std::string& service_name) { |
441 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 441 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
442 if (service_name != content::kBrowserMojoApplicationName) | 442 if (service_name != content::kBrowserServiceName) |
443 return nullptr; | 443 return nullptr; |
444 base::StringPiece manifest_contents = | 444 base::StringPiece manifest_contents = |
445 rb.GetRawDataResourceForScale(IDR_CAST_CONTENT_BROWSER_MANIFEST_OVERLAY, | 445 rb.GetRawDataResourceForScale(IDR_CAST_CONTENT_BROWSER_MANIFEST_OVERLAY, |
446 ui::ScaleFactor::SCALE_FACTOR_NONE); | 446 ui::ScaleFactor::SCALE_FACTOR_NONE); |
447 return base::JSONReader::Read(manifest_contents); | 447 return base::JSONReader::Read(manifest_contents); |
448 } | 448 } |
449 | 449 |
450 #if defined(OS_ANDROID) | 450 #if defined(OS_ANDROID) |
451 | 451 |
452 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 452 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 process_type, dumps_path, false /* upload */); | 549 process_type, dumps_path, false /* upload */); |
550 // StartUploaderThread() even though upload is diferred. | 550 // StartUploaderThread() even though upload is diferred. |
551 // Breakpad-related memory is freed in the uploader thread. | 551 // Breakpad-related memory is freed in the uploader thread. |
552 crash_handler->StartUploaderThread(); | 552 crash_handler->StartUploaderThread(); |
553 return crash_handler; | 553 return crash_handler; |
554 } | 554 } |
555 #endif // !defined(OS_ANDROID) | 555 #endif // !defined(OS_ANDROID) |
556 | 556 |
557 } // namespace shell | 557 } // namespace shell |
558 } // namespace chromecast | 558 } // namespace chromecast |
OLD | NEW |