| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "components/external_video_surface/browser/android/external_video_surfa
ce_container_impl.h" | 63 #include "components/external_video_surface/browser/android/external_video_surfa
ce_container_impl.h" |
| 64 #else | 64 #else |
| 65 #include "chromecast/browser/media/cast_browser_cdm_factory.h" | 65 #include "chromecast/browser/media/cast_browser_cdm_factory.h" |
| 66 #endif // defined(OS_ANDROID) | 66 #endif // defined(OS_ANDROID) |
| 67 | 67 |
| 68 namespace chromecast { | 68 namespace chromecast { |
| 69 namespace shell { | 69 namespace shell { |
| 70 | 70 |
| 71 namespace { | 71 namespace { |
| 72 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 72 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 73 static std::unique_ptr<::shell::ShellClient> CreateMojoMediaApplication( | 73 static std::unique_ptr<::shell::Service> CreateMojoMediaApplication( |
| 74 CastContentBrowserClient* browser_client, | 74 CastContentBrowserClient* browser_client, |
| 75 const base::Closure& quit_closure) { | 75 const base::Closure& quit_closure) { |
| 76 std::unique_ptr<media::CastMojoMediaClient> mojo_media_client( | 76 std::unique_ptr<media::CastMojoMediaClient> mojo_media_client( |
| 77 new media::CastMojoMediaClient( | 77 new media::CastMojoMediaClient( |
| 78 base::Bind(&CastContentBrowserClient::CreateMediaPipelineBackend, | 78 base::Bind(&CastContentBrowserClient::CreateMediaPipelineBackend, |
| 79 base::Unretained(browser_client)), | 79 base::Unretained(browser_client)), |
| 80 base::Bind(&CastContentBrowserClient::CreateCdmFactory, | 80 base::Bind(&CastContentBrowserClient::CreateCdmFactory, |
| 81 base::Unretained(browser_client)))); | 81 base::Unretained(browser_client)))); |
| 82 return std::unique_ptr<::shell::ShellClient>( | 82 return std::unique_ptr<::shell::Service>( |
| 83 new ::media::MojoMediaApplication(std::move(mojo_media_client), | 83 new ::media::MojoMediaApplication(std::move(mojo_media_client), |
| 84 quit_closure)); | 84 quit_closure)); |
| 85 } | 85 } |
| 86 #endif // defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 86 #endif // defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
| 87 | 87 |
| 88 // A provider of services for Geolocation. | 88 // A provider of services for Geolocation. |
| 89 class CastGeolocationDelegate : public content::GeolocationDelegate { | 89 class CastGeolocationDelegate : public content::GeolocationDelegate { |
| 90 public: | 90 public: |
| 91 explicit CastGeolocationDelegate(CastBrowserContext* context) | 91 explicit CastGeolocationDelegate(CastBrowserContext* context) |
| 92 : context_(context) {} | 92 : context_(context) {} |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 process_type, dumps_path, false /* upload */); | 535 process_type, dumps_path, false /* upload */); |
| 536 // StartUploaderThread() even though upload is diferred. | 536 // StartUploaderThread() even though upload is diferred. |
| 537 // Breakpad-related memory is freed in the uploader thread. | 537 // Breakpad-related memory is freed in the uploader thread. |
| 538 crash_handler->StartUploaderThread(); | 538 crash_handler->StartUploaderThread(); |
| 539 return crash_handler; | 539 return crash_handler; |
| 540 } | 540 } |
| 541 #endif // !defined(OS_ANDROID) | 541 #endif // !defined(OS_ANDROID) |
| 542 | 542 |
| 543 } // namespace shell | 543 } // namespace shell |
| 544 } // namespace chromecast | 544 } // namespace chromecast |
| OLD | NEW |