| 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/renderer/cast_content_renderer_client.h" | 5 #include "chromecast/renderer/cast_content_renderer_client.h" |
| 6 | 6 |
| 7 #include <sys/sysinfo.h> | 7 #include <sys/sysinfo.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/memory_pressure_listener.h" | 10 #include "base/memory/memory_pressure_listener.h" |
| 11 #include "chromecast/common/chromecast_switches.h" |
| 11 #include "chromecast/renderer/key_systems_cast.h" | 12 #include "chromecast/renderer/key_systems_cast.h" |
| 13 #include "chromecast/renderer/media/cma_media_renderer_factory.h" |
| 12 #include "components/dns_prefetch/renderer/prescient_networking_dispatcher.h" | 14 #include "components/dns_prefetch/renderer/prescient_networking_dispatcher.h" |
| 13 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
| 16 #include "content/public/renderer/render_frame.h" |
| 14 #include "content/public/renderer/render_view.h" | 17 #include "content/public/renderer/render_view.h" |
| 15 #include "crypto/nss_util.h" | 18 #include "crypto/nss_util.h" |
| 16 #include "third_party/WebKit/public/platform/WebColor.h" | 19 #include "third_party/WebKit/public/platform/WebColor.h" |
| 17 #include "third_party/WebKit/public/web/WebSettings.h" | 20 #include "third_party/WebKit/public/web/WebSettings.h" |
| 18 #include "third_party/WebKit/public/web/WebView.h" | 21 #include "third_party/WebKit/public/web/WebView.h" |
| 19 | 22 |
| 20 namespace chromecast { | 23 namespace chromecast { |
| 21 namespace shell { | 24 namespace shell { |
| 22 | 25 |
| 23 namespace { | 26 namespace { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 webview->settings()->setMediaControlsOverlayPlayButtonEnabled(false); | 65 webview->settings()->setMediaControlsOverlayPlayButtonEnabled(false); |
| 63 } | 66 } |
| 64 } | 67 } |
| 65 | 68 |
| 66 void CastContentRendererClient::AddKeySystems( | 69 void CastContentRendererClient::AddKeySystems( |
| 67 std::vector< ::media::KeySystemInfo>* key_systems) { | 70 std::vector< ::media::KeySystemInfo>* key_systems) { |
| 68 AddChromecastKeySystems(key_systems); | 71 AddChromecastKeySystems(key_systems); |
| 69 AddChromecastPlatformKeySystems(key_systems); | 72 AddChromecastPlatformKeySystems(key_systems); |
| 70 } | 73 } |
| 71 | 74 |
| 75 scoped_ptr<::media::RendererFactory> |
| 76 CastContentRendererClient::CreateMediaRendererFactory( |
| 77 ::content::RenderFrame* render_frame) { |
| 78 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| 79 if (!cmd_line->HasSwitch(switches::kEnableCmaMediaPipeline)) |
| 80 return nullptr; |
| 81 |
| 82 return scoped_ptr<::media::RendererFactory>( |
| 83 new chromecast::media::CmaMediaRendererFactory( |
| 84 render_frame->GetRoutingID())); |
| 85 } |
| 86 |
| 72 blink::WebPrescientNetworking* | 87 blink::WebPrescientNetworking* |
| 73 CastContentRendererClient::GetPrescientNetworking() { | 88 CastContentRendererClient::GetPrescientNetworking() { |
| 74 return prescient_networking_dispatcher_.get(); | 89 return prescient_networking_dispatcher_.get(); |
| 75 } | 90 } |
| 76 | 91 |
| 77 } // namespace shell | 92 } // namespace shell |
| 78 } // namespace chromecast | 93 } // namespace chromecast |
| OLD | NEW |