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 "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // universal access. Only test shell will enable this. | 136 // universal access. Only test shell will enable this. |
137 settings->setAllowUniversalAccessFromFileURLs( | 137 settings->setAllowUniversalAccessFromFileURLs( |
138 allow_universal_access_from_file_urls); | 138 allow_universal_access_from_file_urls); |
139 settings->setAllowFileAccessFromFileURLs(allow_file_access_from_file_urls); | 139 settings->setAllowFileAccessFromFileURLs(allow_file_access_from_file_urls); |
140 | 140 |
141 // We prevent WebKit from checking if it needs to add a "text direction" | 141 // We prevent WebKit from checking if it needs to add a "text direction" |
142 // submenu to a context menu. it is not only because we don't need the result | 142 // submenu to a context menu. it is not only because we don't need the result |
143 // but also because it cause a possible crash in Editor::hasBidiSelection(). | 143 // but also because it cause a possible crash in Editor::hasBidiSelection(). |
144 settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); | 144 settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); |
145 | 145 |
146 #ifdef HAS_WEBAUDIO_FEATURE_ENABLE | |
147 // Enable the web audio API if requested on the command line. | 146 // Enable the web audio API if requested on the command line. |
148 settings->setWebAudioEnabled(webaudio_enabled); | 147 settings->setWebAudioEnabled(webaudio_enabled); |
149 #endif | |
150 | 148 |
151 // Enable experimental WebGL support if requested on command line | 149 // Enable experimental WebGL support if requested on command line |
152 // and support is compiled in. | 150 // and support is compiled in. |
153 bool enable_webgl = | 151 bool enable_webgl = |
154 WebRuntimeFeatures::isWebGLEnabled() && experimental_webgl_enabled; | 152 WebRuntimeFeatures::isWebGLEnabled() && experimental_webgl_enabled; |
155 settings->setExperimentalWebGLEnabled(enable_webgl); | 153 settings->setExperimentalWebGLEnabled(enable_webgl); |
156 | 154 |
157 // Display colored borders around composited render layers if requested | 155 // Display colored borders around composited render layers if requested |
158 // on command line. | 156 // on command line. |
159 settings->setShowDebugBorders(show_composited_layer_borders); | 157 settings->setShowDebugBorders(show_composited_layer_borders); |
(...skipping 29 matching lines...) Expand all Loading... |
189 web_view->setInspectorSetting(WebString::fromUTF8(it->first), | 187 web_view->setInspectorSetting(WebString::fromUTF8(it->first), |
190 WebString::fromUTF8(it->second)); | 188 WebString::fromUTF8(it->second)); |
191 | 189 |
192 // Tabs to link is not part of the settings. WebCore calls | 190 // Tabs to link is not part of the settings. WebCore calls |
193 // ChromeClient::tabsToLinks which is part of the glue code. | 191 // ChromeClient::tabsToLinks which is part of the glue code. |
194 web_view->setTabsToLinks(tabs_to_links); | 192 web_view->setTabsToLinks(tabs_to_links); |
195 | 193 |
196 settings->setInteractiveFormValidationEnabled( | 194 settings->setInteractiveFormValidationEnabled( |
197 interactive_form_validation_enabled); | 195 interactive_form_validation_enabled); |
198 } | 196 } |
OLD | NEW |