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

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

Issue 1308153005: [Chromecast] Plumbs raw audio through CMA backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | chromecast/media/BUILD.gn » ('j') | chromecast/media/BUILD.gn » ('J')
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 <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/files/scoped_file.h" 11 #include "base/files/scoped_file.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "chromecast/base/cast_paths.h" 14 #include "chromecast/base/cast_paths.h"
15 #include "chromecast/base/chromecast_switches.h" 15 #include "chromecast/base/chromecast_switches.h"
16 #include "chromecast/browser/cast_browser_context.h" 16 #include "chromecast/browser/cast_browser_context.h"
17 #include "chromecast/browser/cast_browser_main_parts.h" 17 #include "chromecast/browser/cast_browser_main_parts.h"
18 #include "chromecast/browser/cast_browser_process.h" 18 #include "chromecast/browser/cast_browser_process.h"
19 #include "chromecast/browser/cast_network_delegate.h" 19 #include "chromecast/browser/cast_network_delegate.h"
20 #include "chromecast/browser/cast_quota_permission_context.h" 20 #include "chromecast/browser/cast_quota_permission_context.h"
21 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h" 21 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h"
22 #include "chromecast/browser/geolocation/cast_access_token_store.h" 22 #include "chromecast/browser/geolocation/cast_access_token_store.h"
23 #include "chromecast/browser/media/cma_message_filter_host.h" 23 #include "chromecast/browser/media/cma_message_filter_host.h"
24 #include "chromecast/browser/url_request_context_factory.h" 24 #include "chromecast/browser/url_request_context_factory.h"
25 #include "chromecast/common/global_descriptors.h" 25 #include "chromecast/common/global_descriptors.h"
26 #include "chromecast/media/audio/audio_manager_factory.h"
26 #include "chromecast/media/base/media_message_loop.h" 27 #include "chromecast/media/base/media_message_loop.h"
27 #include "chromecast/public/cast_media_shlib.h" 28 #include "chromecast/public/cast_media_shlib.h"
28 #include "chromecast/public/media/media_pipeline_backend.h" 29 #include "chromecast/public/media/media_pipeline_backend.h"
29 #include "components/crash/app/breakpad_linux.h" 30 #include "components/crash/app/breakpad_linux.h"
30 #include "components/crash/browser/crash_handler_host_linux.h" 31 #include "components/crash/browser/crash_handler_host_linux.h"
31 #include "components/network_hints/browser/network_hints_message_filter.h" 32 #include "components/network_hints/browser/network_hints_message_filter.h"
32 #include "content/public/browser/browser_thread.h" 33 #include "content/public/browser/browser_thread.h"
33 #include "content/public/browser/certificate_request_result_type.h" 34 #include "content/public/browser/certificate_request_result_type.h"
34 #include "content/public/browser/client_certificate_delegate.h" 35 #include "content/public/browser/client_certificate_delegate.h"
35 #include "content/public/browser/render_process_host.h" 36 #include "content/public/browser/render_process_host.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 base::CommandLine* command_line) { 68 base::CommandLine* command_line) {
68 } 69 }
69 70
70 std::vector<scoped_refptr<content::BrowserMessageFilter>> 71 std::vector<scoped_refptr<content::BrowserMessageFilter>>
71 CastContentBrowserClient::GetBrowserMessageFilters() { 72 CastContentBrowserClient::GetBrowserMessageFilters() {
72 return std::vector<scoped_refptr<content::BrowserMessageFilter>>(); 73 return std::vector<scoped_refptr<content::BrowserMessageFilter>>();
73 } 74 }
74 75
75 scoped_ptr<::media::AudioManagerFactory> 76 scoped_ptr<::media::AudioManagerFactory>
76 CastContentBrowserClient::CreateAudioManagerFactory() { 77 CastContentBrowserClient::CreateAudioManagerFactory() {
77 // Return nullptr. The factory will not be set, and the statically linked 78 LOG(INFO) << __FUNCTION__;
halliwell 2015/08/28 15:14:18 remove
alokp 2015/09/01 00:23:11 Done.
79 #if defined(OS_ANDROID)
80 // Return nullptr. The factory will not be set, and the default
78 // implementation of AudioManager will be used. 81 // implementation of AudioManager will be used.
79 return scoped_ptr<::media::AudioManagerFactory>(); 82 return scoped_ptr<::media::AudioManagerFactory>();
83 #else
84 return make_scoped_ptr(new media::AudioManagerFactory);
85 #endif
80 } 86 }
halliwell 2015/08/28 15:14:18 Question: why do we need this function now? Isn't
slan 2015/08/31 16:59:56 Right. In fact, this probably doesn't even need to
alokp 2015/09/01 00:23:11 Long story - I will explain this offline.
81 87
82 #if !defined(OS_ANDROID) 88 #if !defined(OS_ANDROID)
83 scoped_ptr<media::MediaPipelineBackend> 89 scoped_ptr<media::MediaPipelineBackend>
84 CastContentBrowserClient::CreateMediaPipelineBackend( 90 CastContentBrowserClient::CreateMediaPipelineBackend(
85 const media::MediaPipelineDeviceParams& params) { 91 const media::MediaPipelineDeviceParams& params) {
86 return make_scoped_ptr( 92 return make_scoped_ptr(
87 media::CastMediaShlib::CreateMediaPipelineBackend(params)); 93 media::CastMediaShlib::CreateMediaPipelineBackend(params));
88 } 94 }
89 #endif 95 #endif
90 96
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 process_type, dumps_path, false /* upload */); 444 process_type, dumps_path, false /* upload */);
439 // StartUploaderThread() even though upload is diferred. 445 // StartUploaderThread() even though upload is diferred.
440 // Breakpad-related memory is freed in the uploader thread. 446 // Breakpad-related memory is freed in the uploader thread.
441 crash_handler->StartUploaderThread(); 447 crash_handler->StartUploaderThread();
442 return crash_handler; 448 return crash_handler;
443 } 449 }
444 #endif // !defined(OS_ANDROID) 450 #endif // !defined(OS_ANDROID)
445 451
446 } // namespace shell 452 } // namespace shell
447 } // namespace chromecast 453 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | chromecast/media/BUILD.gn » ('j') | chromecast/media/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698