| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 void CastContentBrowserClient::OverrideWebkitPrefs( | 147 void CastContentBrowserClient::OverrideWebkitPrefs( |
| 148 content::RenderViewHost* render_view_host, | 148 content::RenderViewHost* render_view_host, |
| 149 const GURL& url, | 149 const GURL& url, |
| 150 content::WebPreferences* prefs) { | 150 content::WebPreferences* prefs) { |
| 151 prefs->allow_scripts_to_close_windows = true; | 151 prefs->allow_scripts_to_close_windows = true; |
| 152 // TODO(lcwu): http://crbug.com/391089. This pref is set to true by default | 152 // TODO(lcwu): http://crbug.com/391089. This pref is set to true by default |
| 153 // because some content providers such as YouTube use plain http requests | 153 // because some content providers such as YouTube use plain http requests |
| 154 // to retrieve media data chunks while running in a https page. This pref | 154 // to retrieve media data chunks while running in a https page. This pref |
| 155 // should be disabled once all the content providers are no longer doing that. | 155 // should be disabled once all the content providers are no longer doing that. |
| 156 prefs->allow_running_insecure_content = true; | 156 prefs->allow_running_insecure_content = true; |
| 157 #if defined(DISABLE_DISPLAY) | |
| 158 prefs->images_enabled = false; | |
| 159 prefs->loads_images_automatically = false; | |
| 160 #endif // defined(DISABLE_DISPLAY) | |
| 161 } | 157 } |
| 162 | 158 |
| 163 std::string CastContentBrowserClient::GetApplicationLocale() { | 159 std::string CastContentBrowserClient::GetApplicationLocale() { |
| 164 const std::string locale(base::i18n::GetConfiguredLocale()); | 160 const std::string locale(base::i18n::GetConfiguredLocale()); |
| 165 return locale.empty() ? "en-US" : locale; | 161 return locale.empty() ? "en-US" : locale; |
| 166 } | 162 } |
| 167 | 163 |
| 168 void CastContentBrowserClient::AllowCertificateError( | 164 void CastContentBrowserClient::AllowCertificateError( |
| 169 int render_process_id, | 165 int render_process_id, |
| 170 int render_view_id, | 166 int render_view_id, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 process_type, dumps_path, false /* upload */); | 334 process_type, dumps_path, false /* upload */); |
| 339 // StartUploaderThread() even though upload is diferred. | 335 // StartUploaderThread() even though upload is diferred. |
| 340 // Breakpad-related memory is freed in the uploader thread. | 336 // Breakpad-related memory is freed in the uploader thread. |
| 341 crash_handler->StartUploaderThread(); | 337 crash_handler->StartUploaderThread(); |
| 342 return crash_handler; | 338 return crash_handler; |
| 343 } | 339 } |
| 344 #endif // !defined(OS_ANDROID) | 340 #endif // !defined(OS_ANDROID) |
| 345 | 341 |
| 346 } // namespace shell | 342 } // namespace shell |
| 347 } // namespace chromecast | 343 } // namespace chromecast |
| OLD | NEW |