| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 blink::WebView* webview = render_view->GetWebView(); | 80 blink::WebView* webview = render_view->GetWebView(); |
| 81 if (webview) { | 81 if (webview) { |
| 82 blink::WebFrameWidget* web_frame_widget = render_view->GetWebFrameWidget(); | 82 blink::WebFrameWidget* web_frame_widget = render_view->GetWebFrameWidget(); |
| 83 web_frame_widget->setBaseBackgroundColor(kColorBlack); | 83 web_frame_widget->setBaseBackgroundColor(kColorBlack); |
| 84 | 84 |
| 85 // The following settings express consistent behaviors across Cast | 85 // The following settings express consistent behaviors across Cast |
| 86 // embedders, though Android has enabled by default for mobile browsers. | 86 // embedders, though Android has enabled by default for mobile browsers. |
| 87 webview->settings()->setShrinksViewportContentToFit(false); | 87 webview->settings()->setShrinksViewportContentToFit(false); |
| 88 webview->settings()->setMediaControlsOverlayPlayButtonEnabled(false); | 88 webview->settings()->setMediaControlsOverlayPlayButtonEnabled(false); |
| 89 | 89 |
| 90 // Scale 1 ensures window.innerHeight/Width match application resolution. | |
| 91 // PageScaleOverride is the 'user agent' value which overrides page | |
| 92 // settings (from meta viewport tag) - thus preventing inconsistency | |
| 93 // between Android and non-Android cast_shell. | |
| 94 webview->setDefaultPageScaleLimits(1.f, 1.f); | |
| 95 webview->setInitialPageScaleOverride(1.f); | |
| 96 | |
| 97 // Disable application cache as Chromecast doesn't support off-line | 90 // Disable application cache as Chromecast doesn't support off-line |
| 98 // application running. | 91 // application running. |
| 99 webview->settings()->setOfflineWebApplicationCacheEnabled(false); | 92 webview->settings()->setOfflineWebApplicationCacheEnabled(false); |
| 100 } | 93 } |
| 101 } | 94 } |
| 102 | 95 |
| 103 void CastContentRendererClient::AddSupportedKeySystems( | 96 void CastContentRendererClient::AddSupportedKeySystems( |
| 104 std::vector<std::unique_ptr<::media::KeySystemProperties>>* | 97 std::vector<std::unique_ptr<::media::KeySystemProperties>>* |
| 105 key_systems_properties) { | 98 key_systems_properties) { |
| 106 AddChromecastKeySystems(key_systems_properties); | 99 AddChromecastKeySystems(key_systems_properties); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 135 closure.Run(); | 128 closure.Run(); |
| 136 return; | 129 return; |
| 137 } | 130 } |
| 138 | 131 |
| 139 // Lifetime is tied to |render_frame| via content::RenderFrameObserver. | 132 // Lifetime is tied to |render_frame| via content::RenderFrameObserver. |
| 140 new CastMediaLoadDeferrer(render_frame, closure); | 133 new CastMediaLoadDeferrer(render_frame, closure); |
| 141 } | 134 } |
| 142 | 135 |
| 143 } // namespace shell | 136 } // namespace shell |
| 144 } // namespace chromecast | 137 } // namespace chromecast |
| OLD | NEW |