OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/memory/scoped_ptr.h" |
7 #include "chromecast/media/cma/backend/media_pipeline_device.h" | 8 #include "chromecast/media/cma/backend/media_pipeline_device.h" |
8 #include "content/public/browser/browser_message_filter.h" | 9 #include "content/public/browser/browser_message_filter.h" |
9 #include "media/audio/audio_manager_factory.h" | 10 #include "media/audio/audio_manager_factory.h" |
10 | 11 |
11 namespace chromecast { | 12 namespace chromecast { |
12 namespace shell { | 13 namespace shell { |
13 | 14 |
| 15 // static |
| 16 scoped_ptr<CastContentBrowserClient> CastContentBrowserClient::Create() { |
| 17 return make_scoped_ptr(new CastContentBrowserClient()); |
| 18 } |
| 19 |
14 void CastContentBrowserClient::PlatformAppendExtraCommandLineSwitches( | 20 void CastContentBrowserClient::PlatformAppendExtraCommandLineSwitches( |
15 base::CommandLine* command_line) { | 21 base::CommandLine* command_line) { |
16 } | 22 } |
17 | 23 |
18 std::vector<scoped_refptr<content::BrowserMessageFilter>> | 24 std::vector<scoped_refptr<content::BrowserMessageFilter>> |
19 CastContentBrowserClient::PlatformGetBrowserMessageFilters() { | 25 CastContentBrowserClient::PlatformGetBrowserMessageFilters() { |
20 return std::vector<scoped_refptr<content::BrowserMessageFilter>>(); | 26 return std::vector<scoped_refptr<content::BrowserMessageFilter>>(); |
21 } | 27 } |
22 | 28 |
23 scoped_ptr<::media::AudioManagerFactory> | 29 scoped_ptr<::media::AudioManagerFactory> |
24 CastContentBrowserClient::PlatformCreateAudioManagerFactory() { | 30 CastContentBrowserClient::PlatformCreateAudioManagerFactory() { |
25 // Return nullptr. The factory will not be set, and the statically linked | 31 // Return nullptr. The factory will not be set, and the statically linked |
26 // implementation of AudioManager will be used. | 32 // implementation of AudioManager will be used. |
27 return scoped_ptr<::media::AudioManagerFactory>(); | 33 return scoped_ptr<::media::AudioManagerFactory>(); |
28 } | 34 } |
29 | 35 |
30 #if !defined(OS_ANDROID) | 36 #if !defined(OS_ANDROID) |
31 scoped_ptr<media::MediaPipelineDevice> | 37 scoped_ptr<media::MediaPipelineDevice> |
32 CastContentBrowserClient::PlatformCreateMediaPipelineDevice( | 38 CastContentBrowserClient::PlatformCreateMediaPipelineDevice( |
33 const media::MediaPipelineDeviceParams& params) { | 39 const media::MediaPipelineDeviceParams& params) { |
34 return media::CreateMediaPipelineDevice(params); | 40 return media::CreateMediaPipelineDevice(params); |
35 } | 41 } |
36 #endif | 42 #endif |
37 | 43 |
38 } // namespace shell | 44 } // namespace shell |
39 } // namespace chromecast | 45 } // namespace chromecast |
OLD | NEW |