Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: chromecast/renderer/cast_content_renderer_client.cc

Issue 2728133002: Media Controls: make the MediaControlsOverlayPlayButton a runtime enabled flag. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromecast/renderer/cast_content_renderer_client.h ('k') | content/child/runtime_features.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chromecast/renderer/cast_content_renderer_client.h ('k') | content/child/runtime_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698