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

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 1908423006: Allow content embedders to create AudioManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ScopedAudioManagerPtr instead of raw pointer Created 4 years, 8 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
« no previous file with comments | « chromecast/browser/cast_content_browser_client.h ('k') | chromecast/media/audio/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 #include "chromecast/browser/cast_browser_main_parts.h" 25 #include "chromecast/browser/cast_browser_main_parts.h"
26 #include "chromecast/browser/cast_browser_process.h" 26 #include "chromecast/browser/cast_browser_process.h"
27 #include "chromecast/browser/cast_network_delegate.h" 27 #include "chromecast/browser/cast_network_delegate.h"
28 #include "chromecast/browser/cast_quota_permission_context.h" 28 #include "chromecast/browser/cast_quota_permission_context.h"
29 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h" 29 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h"
30 #include "chromecast/browser/geolocation/cast_access_token_store.h" 30 #include "chromecast/browser/geolocation/cast_access_token_store.h"
31 #include "chromecast/browser/media/cma_message_filter_host.h" 31 #include "chromecast/browser/media/cma_message_filter_host.h"
32 #include "chromecast/browser/service/cast_service_simple.h" 32 #include "chromecast/browser/service/cast_service_simple.h"
33 #include "chromecast/browser/url_request_context_factory.h" 33 #include "chromecast/browser/url_request_context_factory.h"
34 #include "chromecast/common/global_descriptors.h" 34 #include "chromecast/common/global_descriptors.h"
35 #include "chromecast/media/audio/cast_audio_manager.h"
35 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h" 36 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h"
36 #include "chromecast/public/media/media_pipeline_backend.h" 37 #include "chromecast/public/media/media_pipeline_backend.h"
37 #include "components/crash/content/app/breakpad_linux.h" 38 #include "components/crash/content/app/breakpad_linux.h"
38 #include "components/crash/content/browser/crash_handler_host_linux.h" 39 #include "components/crash/content/browser/crash_handler_host_linux.h"
39 #include "components/network_hints/browser/network_hints_message_filter.h" 40 #include "components/network_hints/browser/network_hints_message_filter.h"
40 #include "content/public/browser/browser_thread.h" 41 #include "content/public/browser/browser_thread.h"
41 #include "content/public/browser/certificate_request_result_type.h" 42 #include "content/public/browser/certificate_request_result_type.h"
42 #include "content/public/browser/client_certificate_delegate.h" 43 #include "content/public/browser/client_certificate_delegate.h"
43 #include "content/public/browser/render_process_host.h" 44 #include "content/public/browser/render_process_host.h"
44 #include "content/public/browser/resource_dispatcher_host.h" 45 #include "content/public/browser/resource_dispatcher_host.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " 412 LOG(ERROR) << "Failed to create file for minidump, crash reporting will "
412 << "be disabled for this process."; 413 << "be disabled for this process.";
413 } else { 414 } else {
414 mappings->Transfer(kAndroidMinidumpDescriptor, 415 mappings->Transfer(kAndroidMinidumpDescriptor,
415 base::ScopedFD(minidump_file.TakePlatformFile())); 416 base::ScopedFD(minidump_file.TakePlatformFile()));
416 } 417 }
417 } 418 }
418 } 419 }
419 420
420 #else 421 #else
422 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager(
423 ::media::AudioLogFactory* audio_log_factory) {
424 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager(
425 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory,
426 media_pipeline_backend_manager()));
427 }
421 428
422 std::unique_ptr<::media::CdmFactory> 429 std::unique_ptr<::media::CdmFactory>
423 CastContentBrowserClient::CreateCdmFactory() { 430 CastContentBrowserClient::CreateCdmFactory() {
424 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 431 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
425 switches::kEnableCmaMediaPipeline)) { 432 switches::kEnableCmaMediaPipeline)) {
426 return base::WrapUnique(new media::CastBrowserCdmFactory( 433 return base::WrapUnique(new media::CastBrowserCdmFactory(
427 GetMediaTaskRunner(), media_resource_tracker())); 434 GetMediaTaskRunner(), media_resource_tracker()));
428 } 435 }
429 436
430 return nullptr; 437 return nullptr;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 process_type, dumps_path, false /* upload */); 498 process_type, dumps_path, false /* upload */);
492 // StartUploaderThread() even though upload is diferred. 499 // StartUploaderThread() even though upload is diferred.
493 // Breakpad-related memory is freed in the uploader thread. 500 // Breakpad-related memory is freed in the uploader thread.
494 crash_handler->StartUploaderThread(); 501 crash_handler->StartUploaderThread();
495 return crash_handler; 502 return crash_handler;
496 } 503 }
497 #endif // !defined(OS_ANDROID) 504 #endif // !defined(OS_ANDROID)
498 505
499 } // namespace shell 506 } // namespace shell
500 } // namespace chromecast 507 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_browser_client.h ('k') | chromecast/media/audio/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698