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 <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" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 | 80 |
81 #if !defined(OS_ANDROID) | 81 #if !defined(OS_ANDROID) |
82 scoped_ptr<media::MediaPipelineBackend> | 82 scoped_ptr<media::MediaPipelineBackend> |
83 CastContentBrowserClient::CreateMediaPipelineBackend( | 83 CastContentBrowserClient::CreateMediaPipelineBackend( |
84 const media::MediaPipelineDeviceParams& params) { | 84 const media::MediaPipelineDeviceParams& params) { |
85 return make_scoped_ptr( | 85 return make_scoped_ptr( |
86 media::CastMediaShlib::CreateMediaPipelineBackend(params)); | 86 media::CastMediaShlib::CreateMediaPipelineBackend(params)); |
87 } | 87 } |
88 #endif | 88 #endif |
89 | 89 |
90 void CastContentBrowserClient::SetMetricsClientId( | |
91 const std::string& client_id) { | |
92 } | |
93 | |
94 void CastContentBrowserClient::RegisterMetricsProviders( | |
95 ::metrics::MetricsService* metrics_service) { | |
96 } | |
97 | |
90 content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts( | 98 content::BrowserMainParts* CastContentBrowserClient::CreateBrowserMainParts( |
91 const content::MainFunctionParams& parameters) { | 99 const content::MainFunctionParams& parameters) { |
92 return new CastBrowserMainParts(parameters, | 100 content::BrowserMainParts* parts = new CastBrowserMainParts( |
93 url_request_context_factory_.get(), | 101 parameters, url_request_context_factory_.get(), |
94 CreateAudioManagerFactory()); | 102 CreateAudioManagerFactory()); |
103 CastBrowserProcess::GetInstance()->SetCastContentBrowserClient(this); | |
halliwell
2015/08/19 20:56:18
why not pass 'this' through CastBrowserMainParts c
gunsch
2015/08/19 21:23:12
Discussed offline, this is in keeping with CastBro
| |
104 return parts; | |
95 } | 105 } |
96 | 106 |
97 void CastContentBrowserClient::RenderProcessWillLaunch( | 107 void CastContentBrowserClient::RenderProcessWillLaunch( |
98 content::RenderProcessHost* host) { | 108 content::RenderProcessHost* host) { |
99 #if !defined(OS_ANDROID) | 109 #if !defined(OS_ANDROID) |
100 scoped_refptr<media::CmaMessageFilterHost> cma_message_filter( | 110 scoped_refptr<media::CmaMessageFilterHost> cma_message_filter( |
101 new media::CmaMessageFilterHost( | 111 new media::CmaMessageFilterHost( |
102 host->GetID(), | 112 host->GetID(), |
103 base::Bind(&CastContentBrowserClient::CreateMediaPipelineBackend, | 113 base::Bind(&CastContentBrowserClient::CreateMediaPipelineBackend, |
104 base::Unretained(this)))); | 114 base::Unretained(this)))); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
420 process_type, dumps_path, false /* upload */); | 430 process_type, dumps_path, false /* upload */); |
421 // StartUploaderThread() even though upload is diferred. | 431 // StartUploaderThread() even though upload is diferred. |
422 // Breakpad-related memory is freed in the uploader thread. | 432 // Breakpad-related memory is freed in the uploader thread. |
423 crash_handler->StartUploaderThread(); | 433 crash_handler->StartUploaderThread(); |
424 return crash_handler; | 434 return crash_handler; |
425 } | 435 } |
426 #endif // !defined(OS_ANDROID) | 436 #endif // !defined(OS_ANDROID) |
427 | 437 |
428 } // namespace shell | 438 } // namespace shell |
429 } // namespace chromecast | 439 } // namespace chromecast |
OLD | NEW |