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

Unified Diff: chrome/browser/extensions/extension_host.cc

Issue 8403024: Set extension-related webkit preferences in a common location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove is_web_ui param Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 85fb48aeace6ea1d3de735d6f062382ce403cb76..717816c80f0575b95859c7ebef99f1d0687a4c0b 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -526,24 +526,8 @@ RendererPreferences ExtensionHost::GetRendererPrefs(
}
WebPreferences ExtensionHost::GetWebkitPrefs() {
- Profile* profile = Profile::FromBrowserContext(
- render_view_host()->process()->browser_context());
WebPreferences webkit_prefs =
- RenderViewHostDelegateHelper::GetWebkitPrefs(profile,
- false); // is_web_ui
- // Extensions are trusted so we override any user preferences for disabling
- // javascript or images.
- webkit_prefs.loads_images_automatically = true;
- webkit_prefs.javascript_enabled = true;
-
- // Enable privileged WebGL extensions.
- webkit_prefs.privileged_webgl_extensions_enabled = true;
-
- if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP ||
- extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG ||
- extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE ||
- extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR)
- webkit_prefs.allow_scripts_to_close_windows = true;
+ RenderViewHostDelegateHelper::GetWebkitPrefs(render_view_host());
// Disable anything that requires the GPU process for background pages.
// See http://crbug.com/64512 and http://crbug.com/64841.
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/extensions/extension_webkit_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698