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

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: should create a cast target 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"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "chromecast/base/chromecast_switches.h" 13 #include "chromecast/base/chromecast_switches.h"
14 #include "chromecast/common/media/cast_media_client.h" 14 #include "chromecast/common/media/cast_media_client.h"
15 #include "chromecast/crash/cast_crash_keys.h" 15 #include "chromecast/crash/cast_crash_keys.h"
16 #include "chromecast/media/base/supported_codec_profile_levels_memo.h" 16 #include "chromecast/media/base/supported_codec_profile_levels_memo.h"
17 #include "chromecast/renderer/cast_render_frame_action_deferrer.h" 17 #include "chromecast/renderer/cast_render_frame_action_deferrer.h"
18 #include "chromecast/renderer/key_systems_cast.h" 18 #include "chromecast/renderer/key_systems_cast.h"
19 #include "chromecast/renderer/media/media_caps_observer_impl.h" 19 #include "chromecast/renderer/media/media_caps_observer_impl.h"
20 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" 20 #include "components/network_hints/renderer/prescient_networking_dispatcher.h"
21 #include "content/public/common/content_switches.h" 21 #include "content/public/common/content_switches.h"
22 #include "content/public/renderer/render_frame.h" 22 #include "content/public/renderer/render_frame.h"
23 #include "content/public/renderer/render_thread.h" 23 #include "content/public/renderer/render_thread.h"
24 #include "content/public/renderer/render_view.h" 24 #include "content/public/renderer/render_view.h"
25 #include "media/base/media.h" 25 #include "media/base/media.h"
26 #include "services/service_manager/public/cpp/interface_provider.h" 26 #include "services/service_manager/public/cpp/interface_provider.h"
27 #include "third_party/WebKit/public/platform/WebColor.h" 27 #include "third_party/WebKit/public/platform/WebColor.h"
28 #include "third_party/WebKit/public/web/WebFrameWidget.h" 28 #include "third_party/WebKit/public/web/WebFrameWidget.h"
29 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
29 #include "third_party/WebKit/public/web/WebSettings.h" 30 #include "third_party/WebKit/public/web/WebSettings.h"
30 #include "third_party/WebKit/public/web/WebView.h" 31 #include "third_party/WebKit/public/web/WebView.h"
31 32
32 #if defined(OS_ANDROID) 33 #if defined(OS_ANDROID)
33 #include "media/base/android/media_codec_util.h" 34 #include "media/base/android/media_codec_util.h"
34 #endif // OS_ANDROID 35 #endif // OS_ANDROID
35 36
36 namespace chromecast { 37 namespace chromecast {
37 namespace shell { 38 namespace shell {
38 39
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 base::debug::SetCrashKeyValue(crash_keys::kPreviousApp, previous_app); 92 base::debug::SetCrashKeyValue(crash_keys::kPreviousApp, previous_app);
92 } 93 }
93 94
94 void CastContentRendererClient::RenderViewCreated( 95 void CastContentRendererClient::RenderViewCreated(
95 content::RenderView* render_view) { 96 content::RenderView* render_view) {
96 blink::WebView* webview = render_view->GetWebView(); 97 blink::WebView* webview = render_view->GetWebView();
97 if (webview) { 98 if (webview) {
98 blink::WebFrameWidget* web_frame_widget = render_view->GetWebFrameWidget(); 99 blink::WebFrameWidget* web_frame_widget = render_view->GetWebFrameWidget();
99 web_frame_widget->setBaseBackgroundColor(kColorBlack); 100 web_frame_widget->setBaseBackgroundColor(kColorBlack);
100 101
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 102 // Disable application cache as Chromecast doesn't support off-line
105 // application running. 103 // application running.
106 webview->settings()->setOfflineWebApplicationCacheEnabled(false); 104 webview->settings()->setOfflineWebApplicationCacheEnabled(false);
107 } 105 }
108 } 106 }
109 107
110 void CastContentRendererClient::AddSupportedKeySystems( 108 void CastContentRendererClient::AddSupportedKeySystems(
111 std::vector<std::unique_ptr<::media::KeySystemProperties>>* 109 std::vector<std::unique_ptr<::media::KeySystemProperties>>*
112 key_systems_properties) { 110 key_systems_properties) {
113 AddChromecastKeySystems(key_systems_properties, 111 AddChromecastKeySystems(key_systems_properties,
(...skipping 27 matching lines...) Expand all
141 } 139 }
142 140
143 // Lifetime is tied to |render_frame| via content::RenderFrameObserver. 141 // Lifetime is tied to |render_frame| via content::RenderFrameObserver.
144 new CastRenderFrameActionDeferrer(render_frame, closure); 142 new CastRenderFrameActionDeferrer(render_frame, closure);
145 } 143 }
146 144
147 bool CastContentRendererClient::AllowMediaSuspend() { 145 bool CastContentRendererClient::AllowMediaSuspend() {
148 return false; 146 return false;
149 } 147 }
150 148
149 void CastContentRendererClient::
150 SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {
151 // Settings for ATV (Android defaults are not what we want).
152 blink::WebRuntimeFeatures::enableMediaControlsOverlayPlayButton(false);
153 }
154
151 } // namespace shell 155 } // namespace shell
152 } // namespace chromecast 156 } // 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