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/bind_source_info.h" | 61 #include "services/service_manager/public/cpp/bind_source_info.h" |
61 #include "services/service_manager/public/cpp/binder_registry.h" | 62 #include "services/service_manager/public/cpp/binder_registry.h" |
62 #include "ui/base/resource/resource_bundle.h" | 63 #include "ui/base/resource/resource_bundle.h" |
63 #include "ui/display/display.h" | 64 #include "ui/display/display.h" |
64 #include "ui/display/screen.h" | 65 #include "ui/display/screen.h" |
65 #include "ui/gl/gl_switches.h" | 66 #include "ui/gl/gl_switches.h" |
66 | 67 |
67 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 68 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 CastContentBrowserClient::media_resource_tracker() { | 186 CastContentBrowserClient::media_resource_tracker() { |
186 return cast_browser_main_parts_->media_resource_tracker(); | 187 return cast_browser_main_parts_->media_resource_tracker(); |
187 } | 188 } |
188 | 189 |
189 media::MediaPipelineBackendManager* | 190 media::MediaPipelineBackendManager* |
190 CastContentBrowserClient::media_pipeline_backend_manager() { | 191 CastContentBrowserClient::media_pipeline_backend_manager() { |
191 DCHECK(cast_browser_main_parts_); | 192 DCHECK(cast_browser_main_parts_); |
192 return cast_browser_main_parts_->media_pipeline_backend_manager(); | 193 return cast_browser_main_parts_->media_pipeline_backend_manager(); |
193 } | 194 } |
194 | 195 |
195 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager( | 196 std::unique_ptr<::media::AudioManager> |
| 197 CastContentBrowserClient::CreateAudioManager( |
196 ::media::AudioLogFactory* audio_log_factory) { | 198 ::media::AudioLogFactory* audio_log_factory) { |
197 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager( | 199 return base::MakeUnique<media::CastAudioManager>( |
198 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory, | 200 base::MakeUnique<::media::AudioThreadImpl>(), audio_log_factory, |
199 media_pipeline_backend_manager())); | 201 media_pipeline_backend_manager()); |
200 } | 202 } |
201 | 203 |
202 std::unique_ptr<::media::CdmFactory> | 204 std::unique_ptr<::media::CdmFactory> |
203 CastContentBrowserClient::CreateCdmFactory() { | 205 CastContentBrowserClient::CreateCdmFactory() { |
204 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 206 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
205 return base::MakeUnique<media::CastCdmFactory>(GetMediaTaskRunner(), | 207 return base::MakeUnique<media::CastCdmFactory>(GetMediaTaskRunner(), |
206 media_resource_tracker()); | 208 media_resource_tracker()); |
207 #endif // defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 209 #endif // defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
208 return nullptr; | 210 return nullptr; |
209 } | 211 } |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 process_type, dumps_path, false /* upload */); | 571 process_type, dumps_path, false /* upload */); |
570 // StartUploaderThread() even though upload is diferred. | 572 // StartUploaderThread() even though upload is diferred. |
571 // Breakpad-related memory is freed in the uploader thread. | 573 // Breakpad-related memory is freed in the uploader thread. |
572 crash_handler->StartUploaderThread(); | 574 crash_handler->StartUploaderThread(); |
573 return crash_handler; | 575 return crash_handler; |
574 } | 576 } |
575 #endif // !defined(OS_ANDROID) | 577 #endif // !defined(OS_ANDROID) |
576 | 578 |
577 } // namespace shell | 579 } // namespace shell |
578 } // namespace chromecast | 580 } // namespace chromecast |
OLD | NEW |