OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "webkit/glue/webpreferences.h" | 5 #include "webkit/glue/webpreferences.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "webkit/api/public/WebKit.h" | 8 #include "webkit/api/public/WebKit.h" |
9 #include "webkit/api/public/WebSettings.h" | 9 #include "webkit/api/public/WebSettings.h" |
10 #include "webkit/api/public/WebString.h" | 10 #include "webkit/api/public/WebString.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // we mitigate attacks from local HTML files by not granting file:// URLs | 68 // we mitigate attacks from local HTML files by not granting file:// URLs |
69 // universal access. Only test shell will enable this. | 69 // universal access. Only test shell will enable this. |
70 settings->setAllowUniversalAccessFromFileURLs( | 70 settings->setAllowUniversalAccessFromFileURLs( |
71 allow_universal_access_from_file_urls); | 71 allow_universal_access_from_file_urls); |
72 | 72 |
73 // We prevent WebKit from checking if it needs to add a "text direction" | 73 // We prevent WebKit from checking if it needs to add a "text direction" |
74 // submenu to a context menu. it is not only because we don't need the result | 74 // submenu to a context menu. it is not only because we don't need the result |
75 // but also because it cause a possible crash in Editor::hasBidiSelection(). | 75 // but also because it cause a possible crash in Editor::hasBidiSelection(). |
76 settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); | 76 settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); |
77 | 77 |
| 78 // Enable experimental WebGL support if requested on command line |
| 79 // and support is compiled in. |
| 80 settings->setExperimentalWebGLEnabled(experimental_webgl_enabled); |
| 81 |
78 // Web inspector settings need to be passed in differently. | 82 // Web inspector settings need to be passed in differently. |
79 web_view->SetInspectorSettings(inspector_settings); | 83 web_view->SetInspectorSettings(inspector_settings); |
80 | 84 |
81 // Tabs to link is not part of the settings. WebCore calls | 85 // Tabs to link is not part of the settings. WebCore calls |
82 // ChromeClient::tabsToLinks which is part of the glue code. | 86 // ChromeClient::tabsToLinks which is part of the glue code. |
83 web_view->SetTabsToLinks(tabs_to_links); | 87 web_view->SetTabsToLinks(tabs_to_links); |
84 } | 88 } |
OLD | NEW |