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

Side by Side Diff: chrome/browser/extensions/extension_webkit_preferences.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, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/glue/webpreferences.h"
6
7 #include "chrome/common/extensions/extension.h"
8
9 namespace extension_webkit_preferences {
10
11 void SetPreferences(WebPreferences* webkit_prefs, const Extension* extension) {
12 if (extension && !extension->is_hosted_app()) {
13 // Extensions are trusted so we override any user preferences for disabling
14 // javascript or images.
15 webkit_prefs->loads_images_automatically = true;
16 webkit_prefs->javascript_enabled = true;
17
18 // Tabs aren't typically allowed to close windows. But extensions shouldn't
19 // be subject to that.
20 webkit_prefs->allow_scripts_to_close_windows = true;
21
22 // Enable privileged WebGL extensions.
23 webkit_prefs->privileged_webgl_extensions_enabled = true;
24 }
25 }
26
27 } // extension_webkit_preferences
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_webkit_preferences.h ('k') | chrome/browser/notifications/balloon_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698