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/browser/cast_content_browser_client.h" | 5 #include "chromecast/browser/cast_content_browser_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 void CastContentBrowserClient::OverrideWebkitPrefs( | 122 void CastContentBrowserClient::OverrideWebkitPrefs( |
123 content::RenderViewHost* render_view_host, | 123 content::RenderViewHost* render_view_host, |
124 const GURL& url, | 124 const GURL& url, |
125 content::WebPreferences* prefs) { | 125 content::WebPreferences* prefs) { |
126 prefs->allow_scripts_to_close_windows = true; | 126 prefs->allow_scripts_to_close_windows = true; |
127 // TODO(lcwu): http://crbug.com/391089. This pref is set to true by default | 127 // TODO(lcwu): http://crbug.com/391089. This pref is set to true by default |
128 // because some content providers such as YouTube use plain http requests | 128 // because some content providers such as YouTube use plain http requests |
129 // to retrieve media data chunks while running in a https page. This pref | 129 // to retrieve media data chunks while running in a https page. This pref |
130 // should be disabled once all the content providers are no longer doing that. | 130 // should be disabled once all the content providers are no longer doing that. |
131 prefs->allow_running_insecure_content = true; | 131 prefs->allow_running_insecure_content = true; |
| 132 #if defined(DISABLE_DISPLAY) |
| 133 prefs->images_enabled = false; |
| 134 prefs->loads_images_automatically = false; |
| 135 #endif // defined(DISABLE_DISPLAY) |
132 } | 136 } |
133 | 137 |
134 std::string CastContentBrowserClient::GetApplicationLocale() { | 138 std::string CastContentBrowserClient::GetApplicationLocale() { |
135 const std::string locale(base::i18n::GetConfiguredLocale()); | 139 const std::string locale(base::i18n::GetConfiguredLocale()); |
136 return locale.empty() ? "en-US" : locale; | 140 return locale.empty() ? "en-US" : locale; |
137 } | 141 } |
138 | 142 |
139 void CastContentBrowserClient::AllowCertificateError( | 143 void CastContentBrowserClient::AllowCertificateError( |
140 int render_process_id, | 144 int render_process_id, |
141 int render_view_id, | 145 int render_view_id, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 content::ExternalVideoSurfaceContainer* | 270 content::ExternalVideoSurfaceContainer* |
267 CastContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 271 CastContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
268 content::WebContents* web_contents) { | 272 content::WebContents* web_contents) { |
269 return new ExternalVideoSurfaceContainerImpl(web_contents); | 273 return new ExternalVideoSurfaceContainerImpl(web_contents); |
270 } | 274 } |
271 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) | 275 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) |
272 | 276 |
273 | 277 |
274 } // namespace shell | 278 } // namespace shell |
275 } // namespace chromecast | 279 } // namespace chromecast |
OLD | NEW |