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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 base::debug::SetCrashKeyValue(crash_keys::kPreviousApp, previous_app); | 91 base::debug::SetCrashKeyValue(crash_keys::kPreviousApp, previous_app); |
92 } | 92 } |
93 | 93 |
94 void CastContentRendererClient::RenderViewCreated( | 94 void CastContentRendererClient::RenderViewCreated( |
95 content::RenderView* render_view) { | 95 content::RenderView* render_view) { |
96 blink::WebView* webview = render_view->GetWebView(); | 96 blink::WebView* webview = render_view->GetWebView(); |
97 if (webview) { | 97 if (webview) { |
98 blink::WebFrameWidget* web_frame_widget = render_view->GetWebFrameWidget(); | 98 blink::WebFrameWidget* web_frame_widget = render_view->GetWebFrameWidget(); |
99 web_frame_widget->setBaseBackgroundColor(kColorBlack); | 99 web_frame_widget->setBaseBackgroundColor(kColorBlack); |
100 | 100 |
101 // Settings for ATV (Android defaults are not what we want): | |
102 webview->settings()->setMediaControlsOverlayPlayButtonEnabled(false); | |
103 | |
104 // Disable application cache as Chromecast doesn't support off-line | 101 // Disable application cache as Chromecast doesn't support off-line |
105 // application running. | 102 // application running. |
106 webview->settings()->setOfflineWebApplicationCacheEnabled(false); | 103 webview->settings()->setOfflineWebApplicationCacheEnabled(false); |
107 } | 104 } |
108 } | 105 } |
109 | 106 |
110 void CastContentRendererClient::AddSupportedKeySystems( | 107 void CastContentRendererClient::AddSupportedKeySystems( |
111 std::vector<std::unique_ptr<::media::KeySystemProperties>>* | 108 std::vector<std::unique_ptr<::media::KeySystemProperties>>* |
112 key_systems_properties) { | 109 key_systems_properties) { |
113 AddChromecastKeySystems(key_systems_properties, | 110 AddChromecastKeySystems(key_systems_properties, |
(...skipping 27 matching lines...) Expand all Loading... | |
141 } | 138 } |
142 | 139 |
143 // Lifetime is tied to |render_frame| via content::RenderFrameObserver. | 140 // Lifetime is tied to |render_frame| via content::RenderFrameObserver. |
144 new CastRenderFrameActionDeferrer(render_frame, closure); | 141 new CastRenderFrameActionDeferrer(render_frame, closure); |
145 } | 142 } |
146 | 143 |
147 bool CastContentRendererClient::AllowMediaSuspend() { | 144 bool CastContentRendererClient::AllowMediaSuspend() { |
148 return false; | 145 return false; |
149 } | 146 } |
150 | 147 |
148 void CastContentRendererClient:: | |
149 SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() { | |
150 // Settings for ATV (Android defaults are not what we want). | |
151 WebRuntimeFeatures::enableMediaControlsOverlayPlayButton(false); | |
halliwell
2017/03/03 15:26:29
do you need to include a header for WebRuntimeFeat
| |
152 } | |
153 | |
151 } // namespace shell | 154 } // namespace shell |
152 } // namespace chromecast | 155 } // namespace chromecast |
OLD | NEW |