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

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 837573003: Chromecast: adds disable_display define for headless builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/browser/cast_browser_main_parts.cc ('k') | chromecast/chromecast.gyp » ('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/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
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
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
OLDNEW
« no previous file with comments | « chromecast/browser/cast_browser_main_parts.cc ('k') | chromecast/chromecast.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698