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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "content/public/browser/client_certificate_delegate.h" | 48 #include "content/public/browser/client_certificate_delegate.h" |
49 #include "content/public/browser/render_process_host.h" | 49 #include "content/public/browser/render_process_host.h" |
50 #include "content/public/browser/resource_dispatcher_host.h" | 50 #include "content/public/browser/resource_dispatcher_host.h" |
51 #include "content/public/browser/storage_partition.h" | 51 #include "content/public/browser/storage_partition.h" |
52 #include "content/public/browser/web_contents.h" | 52 #include "content/public/browser/web_contents.h" |
53 #include "content/public/common/content_descriptors.h" | 53 #include "content/public/common/content_descriptors.h" |
54 #include "content/public/common/content_switches.h" | 54 #include "content/public/common/content_switches.h" |
55 #include "content/public/common/service_names.mojom.h" | 55 #include "content/public/common/service_names.mojom.h" |
56 #include "content/public/common/url_constants.h" | 56 #include "content/public/common/url_constants.h" |
57 #include "content/public/common/web_preferences.h" | 57 #include "content/public/common/web_preferences.h" |
| 58 #include "media/audio/audio_thread_impl.h" |
58 #include "net/ssl/ssl_cert_request_info.h" | 59 #include "net/ssl/ssl_cert_request_info.h" |
59 #include "net/url_request/url_request_context_getter.h" | 60 #include "net/url_request/url_request_context_getter.h" |
60 #include "services/service_manager/public/cpp/binder_registry.h" | 61 #include "services/service_manager/public/cpp/binder_registry.h" |
61 #include "ui/base/resource/resource_bundle.h" | 62 #include "ui/base/resource/resource_bundle.h" |
62 #include "ui/display/display.h" | 63 #include "ui/display/display.h" |
63 #include "ui/display/screen.h" | 64 #include "ui/display/screen.h" |
64 #include "ui/gl/gl_switches.h" | 65 #include "ui/gl/gl_switches.h" |
65 | 66 |
66 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 67 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
67 #include "chromecast/media/service/cast_mojo_media_client.h" | 68 #include "chromecast/media/service/cast_mojo_media_client.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 CastContentBrowserClient::media_resource_tracker() { | 185 CastContentBrowserClient::media_resource_tracker() { |
185 return cast_browser_main_parts_->media_resource_tracker(); | 186 return cast_browser_main_parts_->media_resource_tracker(); |
186 } | 187 } |
187 | 188 |
188 media::MediaPipelineBackendManager* | 189 media::MediaPipelineBackendManager* |
189 CastContentBrowserClient::media_pipeline_backend_manager() { | 190 CastContentBrowserClient::media_pipeline_backend_manager() { |
190 DCHECK(cast_browser_main_parts_); | 191 DCHECK(cast_browser_main_parts_); |
191 return cast_browser_main_parts_->media_pipeline_backend_manager(); | 192 return cast_browser_main_parts_->media_pipeline_backend_manager(); |
192 } | 193 } |
193 | 194 |
194 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager( | 195 std::unique_ptr<::media::AudioManager> |
| 196 CastContentBrowserClient::CreateAudioManager( |
195 ::media::AudioLogFactory* audio_log_factory) { | 197 ::media::AudioLogFactory* audio_log_factory) { |
196 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager( | 198 return base::MakeUnique<media::CastAudioManager>( |
197 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory, | 199 base::MakeUnique<::media::AudioThreadImpl>(), audio_log_factory, |
198 media_pipeline_backend_manager())); | 200 media_pipeline_backend_manager()); |
199 } | 201 } |
200 | 202 |
201 std::unique_ptr<::media::CdmFactory> | 203 std::unique_ptr<::media::CdmFactory> |
202 CastContentBrowserClient::CreateCdmFactory() { | 204 CastContentBrowserClient::CreateCdmFactory() { |
203 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 205 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
204 return base::MakeUnique<media::CastCdmFactory>(GetMediaTaskRunner(), | 206 return base::MakeUnique<media::CastCdmFactory>(GetMediaTaskRunner(), |
205 media_resource_tracker()); | 207 media_resource_tracker()); |
206 #endif // defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 208 #endif // defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
207 return nullptr; | 209 return nullptr; |
208 } | 210 } |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 process_type, dumps_path, false /* upload */); | 568 process_type, dumps_path, false /* upload */); |
567 // StartUploaderThread() even though upload is diferred. | 569 // StartUploaderThread() even though upload is diferred. |
568 // Breakpad-related memory is freed in the uploader thread. | 570 // Breakpad-related memory is freed in the uploader thread. |
569 crash_handler->StartUploaderThread(); | 571 crash_handler->StartUploaderThread(); |
570 return crash_handler; | 572 return crash_handler; |
571 } | 573 } |
572 #endif // !defined(OS_ANDROID) | 574 #endif // !defined(OS_ANDROID) |
573 | 575 |
574 } // namespace shell | 576 } // namespace shell |
575 } // namespace chromecast | 577 } // namespace chromecast |
OLD | NEW |