diff options
author | gunsch <gunsch@chromium.org> | 2015-01-08 10:52:52 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-08 18:53:47 +0000 |
commit | a4b98fb5b518e886851131916816c0b607768392 (patch) | |
tree | 3e50b252c325f2f541deca17bdcdd2dba17561f4 /chromecast/browser | |
parent | e5468a3b1d4a9d6d590aefa0139ab7119b785e14 (diff) | |
download | chromium_src-a4b98fb5b518e886851131916816c0b607768392.zip chromium_src-a4b98fb5b518e886851131916816c0b607768392.tar.gz chromium_src-a4b98fb5b518e886851131916816c0b607768392.tar.bz2 |
Chromecast: adds disable_display define for headless builds.
Headless builds should include a few optimizations by default:
* Force-disabling GPU
* Not loading image resources
R=lcwu@chromium.org
BUG=336640
Review URL: https://codereview.chromium.org/837573003
Cr-Commit-Position: refs/heads/master@{#310546}
Diffstat (limited to 'chromecast/browser')
-rw-r--r-- | chromecast/browser/cast_browser_main_parts.cc | 3 | ||||
-rw-r--r-- | chromecast/browser/cast_content_browser_client.cc | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc index 43b1d28..54f001d 100644 --- a/chromecast/browser/cast_browser_main_parts.cc +++ b/chromecast/browser/cast_browser_main_parts.cc @@ -56,6 +56,9 @@ DefaultCommandLineSwitch g_default_switches[] = { { switches::kDisablePlugins, "" }, // Always enable HTMLMediaElement logs. { switches::kBlinkPlatformLogChannels, "Media"}, +#if defined(DISABLE_DISPLAY) + { switches::kDisableGpu, "" }, +#endif #if defined(OS_LINUX) && defined(ARCH_CPU_X86_FAMILY) // This is needed for now to enable the egltest Ozone platform to work with // current Linux/NVidia OpenGL drivers. diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc index 677d900..42bfb33 100644 --- a/chromecast/browser/cast_content_browser_client.cc +++ b/chromecast/browser/cast_content_browser_client.cc @@ -129,6 +129,10 @@ void CastContentBrowserClient::OverrideWebkitPrefs( // to retrieve media data chunks while running in a https page. This pref // should be disabled once all the content providers are no longer doing that. prefs->allow_running_insecure_content = true; +#if defined(DISABLE_DISPLAY) + prefs->images_enabled = false; + prefs->loads_images_automatically = false; +#endif // defined(DISABLE_DISPLAY) } std::string CastContentBrowserClient::GetApplicationLocale() { |