OLD | NEW |
(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 |
OLD | NEW |